On May 3, 2011, at 11:10 PM, Andrew Dunstan wrote:
> On 05/03/2011 09:53 PM, David Blewett wrote:
>> On Tue, May 3, 2011 at 9:51 PM, David Blewett<da...@dawninglight.net>  wrote:
>>> This seems like a pretty good idea, but maybe it'd be easiest to take
>>> it a step further and add an "automatic pgindent-ified" patch is
>>> created when a patch is added to the commitfest app?
>> 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.

What if this hypothetical tool pulled the latest source, made a copy of that 
source, applied the patch to the copy, pg_indented the original AND the copy, 
and then diff'd? I think that would give you a properly indented patch. The 
context lines in the patch would have the wrong indentation, but I think patch 
is pretty smart about dealing with that (or at least can be told to ignore 
whitespace differences).
--
Jim C. Nasby, Database Architect                   j...@nasby.net
512.569.9461 (cell)                         http://jim.nasby.net



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to