Re: branching for 9.2devel - Mailing list pgsql-hackers

From Tom Lane
Subject Re: branching for 9.2devel
Date
Msg-id 2095.1304482791@sss.pgh.pa.us
Whole thread Raw
In response to Re: branching for 9.2devel  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: branching for 9.2devel  (Robert Haas <robertmhaas@gmail.com>)
Re: branching for 9.2devel  (Josh Berkus <josh@agliodbs.com>)
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> On 05/03/2011 09:53 PM, David Blewett wrote:
>> On Tue, May 3, 2011 at 9:51 PM, David Blewett<david@dawninglight.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


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: branching for 9.2devel
Next
From: "Johann 'Myrkraverk' Oskarsson"
Date:
Subject: Re: DLL export with mingw-w64: currently a no-op