Re: [HACKERS] Patch Submission Guidelines - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: [HACKERS] Patch Submission Guidelines
Date
Msg-id 200602241716.k1OHGwZ13249@candle.pha.pa.us
Whole thread Raw
In response to Re: [HACKERS] Patch Submission Guidelines  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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. +

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: constant too large in port/gettimeofday
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Patch Submission Guidelines