Skip site navigation (1) Skip section navigation (2)

Re: Patch Submission Guidelines

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Patch Submission Guidelines
Date: 2006-02-16 14:38:26
Message-ID: 20060216143826.GB5072@surnet.cl (view raw, whole thread or download thread mbox)
Thread:
Lists: pgsql-hackerspgsql-patches
Robert Treat wrote:
> On Thursday 16 February 2006 00:27, Tom Lane wrote:
> > Robert Treat <xzilla(at)users(dot)sourceforge(dot)net> writes:
> > > ! 		<li>The patch should be generated in contextual diff format and
> > > should ! 		be applicable from the root directory. If you are unfamiliar
> > > with ! 		this, you might find the script
> > > <I>src/tools/makediff/difforig</I> ! 		useful.  Unified diffs are only
> > > preferrable if the file changes are ! 		single-line changes and do not
> > > rely on the surrounding lines.</li>
> >
> > I'd like the policy to be "contextual diffs are preferred", full stop.
> > Unidiffs are more compact but they sacrifice readability of the patch
> > (IMHO anyway) and when you are preparing a patch you should be thinking
> > first in terms of making it readable for the reviewers/committers.
> >
> > Some things that follow along with the readability mandate, and should
> > be brought out somewhere here:
> >   * avoid unnecessary whitespace changes.  They just distract the
> >     reviewer, and your formatting changes will probably not survive
> >     the next pgindent run anyway.
> 
> would diff -c --ignore-space-change be better?

No, because some whitespace changes are important.  For example when you
indent a piece of code one level higher.  The submitter should eyeball
the patch (in diff form) and clean things up when something unexpected
appears, like a no-op whitespace change.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2006-02-16 14:41:08
Subject: Re: Generating config stuff from single source
Previous:From: Jonah H. HarrisDate: 2006-02-16 14:19:44
Subject: Re: qsort again (was Re: [PERFORM] Strange Create Index

pgsql-patches by date

Next:From: Tom LaneDate: 2006-02-16 14:48:54
Subject: Re: [HACKERS] Patch Submission Guidelines
Previous:From: Robert TreatDate: 2006-02-16 12:17:51
Subject: Re: [HACKERS] Patch Submission Guidelines

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group