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. +

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

Reply via email to