Re: [HACKERS] Patch Submission Guidelines

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>, pgsql-patches(at)postgresql(dot)org
Subject: Re: [HACKERS] Patch Submission Guidelines
Date: 2006-02-24 17:16:58
Message-ID: 200602241716.k1OHGwZ13249@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> > ! <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.

This unified diff sentence was added recently, because I had a case
where I was posting a diff, and a unified version was actually clearer
than the context diff version because it was a file were we were
changing discrete lines, rather than blocks of code. It might be a
small enough number of cases that it isn't worth mentioning, but we have
had people say they find unified diffs clearer, so I wanted to mention
_where_ unified diffs are clearer, and where they are not. I thought
this might encourage people to use content diffs more often if they
understood _why_?

--
Bruce Momjian http://candle.pha.pa.us
SRA OSS, Inc. http://www.sraoss.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2006-02-24 17:18:22 Re: [HACKERS] Patch Submission Guidelines
Previous Message Rod Taylor 2006-02-24 16:57:46 Re: fsutil ideas

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2006-02-24 17:18:22 Re: [HACKERS] Patch Submission Guidelines
Previous Message Bruce Momjian 2006-02-24 16:57:24 Re: constant too large in port/gettimeofday