docs/116459: [Porters' Handbook] Thing to watch out while adding patches with lots of useless whitespace changes

Alexey Dokuchaev danfe at FreeBSD.org
Wed Sep 19 10:10:02 UTC 2007


>Number:         116459
>Category:       docs
>Synopsis:       [Porters' Handbook] Thing to watch out while adding patches with lots of useless whitespace changes
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 19 10:10:01 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Alexey Dokuchaev
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
>Environment:


System: FreeBSD 7.0-CURRENT #1: Wed Jul 11 20:20:23 NOVST 2007
    root at stan.asempra.local:/usr/obj/usr/src/sys/LITE



>Description:


I've seen on several occasions that people do not use their best judgement
when fixing some problematic issue with their ports, by committing huge
patches that consist mostly of non-functional whitespace.  Those are,
despite being huge, make people's lived significantly harder if they decide
to find out the root of the problem, since they'd have to deal with tons of
"noise" hunks while reading such patches.

Attached is my quick'n'dirty attept to write appropriate warning paragraph in
Porters' Book.  It probably nees some polishing.  It also contains indentation
nit along the way.


>How-To-Repeat:


N/A


>Fix:


--- diff begins here ---
Index: book.sgml
===================================================================
RCS file: /home/dcvs/doc/en_US.ISO8859-1/books/porters-handbook/book.sgml,v
retrieving revision 1.870
diff -u -r1.870 book.sgml
--- book.sgml	9 Sep 2007 00:24:33 -0000	1.870
+++ book.sgml	19 Sep 2007 09:39:23 -0000
@@ -680,8 +680,18 @@
 	  <command>autoconf</command> to regenerate
 	  <command>configure</command>, do not take the diffs of
 	  <command>configure</command> (it often grows to a few thousand
-	  lines!); define <literal>USE_AUTOTOOLS=autoconf:253</literal> and take the
-	  diffs of <filename>configure.in</filename>.</para>
+	  lines!); define <literal>USE_AUTOTOOLS=autoconf:253</literal> and
+	  take the diffs of <filename>configure.in</filename>.</para>
+
+	<para>Also, try to minimize the amount of non-functional whitespace
+	  in your patches.  It is common in Open Source world for projects
+	  to share large amount of code base, but obey different style and
+	  indent rules.  If you take working piece of functionality from one
+	  project to fix similar area in another, be careful: resulting
+	  several-thousand line patch may be well worth of non-functional
+	  changes.  Besides increasing the size of CVS repository, it makes
+	  other people's trying to find out exactly what had caused the
+	  problem lives harder.</para>
 
 	<para>If you had to delete a file, then you can do it in the
 	  <maketarget>post-extract</maketarget> target rather than as part of
--- diff ends here ---



>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-doc mailing list