Re: branching for 9.2devel

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: David Blewett <david(at)dawninglight(dot)net>, Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>, Greg Stark <gsstark(at)mit(dot)edu>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: branching for 9.2devel
Date: 2011-05-04 04:19:51
Message-ID: 2095.1304482791@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> On 05/03/2011 09:53 PM, David Blewett wrote:
>> On Tue, May 3, 2011 at 9:51 PM, David Blewett<david(at)dawninglight(dot)net> wrote:
>> That should read: ... but maybe it'd be easiest to take it a step
>> further and have an additional, automatically created patch file that
>> is run through pgindent when a patch is added to the commitfest app.

> You can't indent patches, only patched files. And that's the problem
> with this happy scheme. For it to work at all sanely we'd need to keep
> the committed code that the patch is to be applied against strictly
> pgindent clean, presumably via some automated process such as a commit
> hook. That's been suggested in the past, but hasn't met with universal
> approval, IIRC.

Another point here is that insisting on perfectly indented results can
often be counterproductive for the readability of the patch. Consider
a patch that does

+ if (new-condition)
+ {
+ do something new;
+ }
+ else
+ {
large existing block of code;
+ }

Now, obviously, the large existing block of code is going to have to be
pushed one tab stop to the right eventually. But it is no service to
the readability of the patch to insist that that be part of the
submitted diff. It's much better if that happens separately.

Mind you, I've read more than enough horribly-formatted patches to wish
that we could do something about this. But I doubt that a mechanical
reformatting pass before reviewing will be a net plus.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Зотов Роман 2011-05-04 05:00:42 Re: Prefered Types
Previous Message Andrew Dunstan 2011-05-04 04:10:57 Re: branching for 9.2devel