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

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 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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

pgsql-hackers by date

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

pgsql-patches by date

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

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