From mwlucas@turtledawn.blackhelicopters.org  Mon Mar 12 06:23:11 2001
Return-Path: <mwlucas@turtledawn.blackhelicopters.org>
Received: from turtledawn.blackhelicopters.org (mag.gltg.com [198.88.118.10])
	by hub.freebsd.org (Postfix) with ESMTP id 690BA37B718
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 12 Mar 2001 06:23:10 -0800 (PST)
	(envelope-from mwlucas@turtledawn.blackhelicopters.org)
Received: (from mwlucas@localhost)
	by turtledawn.blackhelicopters.org (8.11.3/8.11.2) id f2CENAG00879;
	Mon, 12 Mar 2001 09:23:10 -0500 (EST)
	(envelope-from mwlucas)
Message-Id: <200103121423.f2CENAG00879@turtledawn.blackhelicopters.org>
Date: Mon, 12 Mar 2001 09:23:10 -0500 (EST)
From: mwlucas@blackhelicopters.org
Reply-To: mwlucas@blackhelicopters.org
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: handbook correction
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         25735
>Category:       docs
>Synopsis:       error in handbook
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 12 06:30:01 PST 2001
>Closed-Date:    Fri Jun 15 03:48:33 PDT 2001
>Last-Modified:  Fri Jun 15 03:49:12 PDT 2001
>Originator:     Michael Lucas
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
None
>Environment:
System: FreeBSD turtledawn.blackhelicopters.org 5.0-CURRENT FreeBSD 5.0-CURRENT #3: Fri Mar 9 12:12:04 EST 2001 mwlucas@turtledawn.blackhelicopters.org:/usr/obj/usr/src/sys/TURTLEDAWN i386


>Description:

The handbook says that context diffs are preferred.  Unified diffs are
the consensus on -hackers, i.e.:

Date: Sat, 10 Mar 2001 12:03:18 -0800
From: Jordan Hubbard <jkh@osd.bsdi.com>
Subject: Re: context or unified diffs in PRs?
To: mwlucas@blackhelicopters.org           
Cc: hackers@FreeBSD.ORG                                 
X-Mailer: Mew version 1.94.1 on Emacs 20.7 / Mule 4.0 (HANANOEN)

The handbook is wrong.  Unidiffs are a far more advanced lifeform
than context diffs. :)
     
- Jordan 


>How-To-Repeat:
	
>Fix:


in /usr/doc/en_US.ISO_8859-1/books/handbook/contrib:

--- chapter.sgml	Mon Mar 12 09:12:08 2001
+++ chapter.sgml-dist	Mon Mar 12 09:11:46 2001
@@ -501,11 +501,11 @@
 	being preferred.  For example:</para>
       
       <para>
-	<screen>&prompt.user; <userinput>diff -u oldfile newfile</userinput></screen>
+	<screen>&prompt.user; <userinput>diff -c oldfile newfile</userinput></screen>
 
 	or
 
-	<screen>&prompt.user; <userinput>diff -u -r olddir newdir</userinput></screen>
+	<screen>&prompt.user; <userinput>diff -c -r olddir newdir</userinput></screen>
 	    
 	would generate such a set of context diffs for the given source file
 	or directory hierarchy.  See the man page for &man.diff.1; for more


>Release-Note:
>Audit-Trail:

From: Nik Clayton <nik@freebsd.org>
To: mwlucas@blackhelicopters.org
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: docs/25735: handbook correction
Date: Mon, 12 Mar 2001 14:35:46 +0000

 --FL5UXtIhxfXey3p5
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On Mon, Mar 12, 2001 at 09:23:10AM -0500, mwlucas@blackhelicopters.org wrot=
 e:
 > The handbook says that context diffs are preferred.  Unified diffs are
 > the consensus on -hackers, i.e.:
 
 Unidiffs *are* context diffs.
 
 DES wrote:
 
 You're both either slightly off, or not expressing yourselves clearly.
 Context diffs are called that because they show context around the
 changes. Unified diffs are also context diffs, but they're unified
 because they show removed and added lines in a single block instead of
 separate blocks:
 
 des@flood ~% diff -c old new
 *** old Sun Mar 11 03:04:43 2001
 --- new Sun Mar 11 03:05:02 2001
 ***************
 *** 1,7 ****
   one
   two
   three
 ! fore
   five
   six
   seven
 --- 1,7 ----
   one
   two
   three
 ! four
   five
   six
   seven
 des@flood ~% diff -u old new
 --- old Sun Mar 11 03:04:43 2001
 +++ new Sun Mar 11 03:05:02 2001
 @@ -1,7 +1,7 @@
  one
  two
  three
 -fore
 +four
  five
  six
  seven
 
 Unified diffs are almost always easier to read, because you don't have
 to move your eyes back and forth so much. Context diffs are easier to
 read in the rare cases where a large nearly-contiguous block of text
 has changed and diff(1) screws up because it finds that some of lines
 in the new text are identical to some of the lines in the old text,
 while in fact they're not related:
  =20
 des@flood ~% diff -c old new
 *** old Sun Mar 11 03:07:31 2001
 --- new Sun Mar 11 03:08:08 2001
 ***************
 *** 1,7 ****
 ! the
   little
 ! horse
 ! jumped
 ! over
 ! the
 ! fence
 --- 1,7 ----
 ! three
 ! ducks
 ! swim
 ! in
 ! a
   little
 ! pond
 des@flood ~% diff -u old new
 --- old Sun Mar 11 03:07:31 2001
 +++ new Sun Mar 11 03:08:08 2001
 @@ -1,7 +1,7 @@
 -the
 +three
 +ducks
 +swim
 +in
 +a
  little
 -horse
 -jumped
 -over
 -the
 -fence
 +pond
 
 
 --=20
 FreeBSD: The Power to Serve             http://www.freebsd.org/
 FreeBSD Documentation Project           http://www.freebsd.org/docproj/
 
           --- 15B8 3FFC DDB4 34B0 AA5F  94B7 93A8 0764 2C37 E375 ---
 
 --FL5UXtIhxfXey3p5
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.0.4 (FreeBSD)
 Comment: For info see http://www.gnupg.org
 
 iEYEARECAAYFAjqs3sEACgkQk6gHZCw343VVMwCglBiPv7j/mTce4vLDwiJaJ2zl
 gCAAnj+WYYbaWsMphWiJijSJhqLQmjF6
 =ihka
 -----END PGP SIGNATURE-----
 
 --FL5UXtIhxfXey3p5--

From: Samuel Tardieu <sam@inf.enst.fr>
To: FreeBSD-gnats-submit@freebsd.org
Cc:  
Subject: Re: docs/25735: handbook correction
Date: Fri, 15 Jun 2001 12:35:37 +0200

 This issue has been sorted out. This PR can be closed.
 
State-Changed-From-To: open->closed 
State-Changed-By: nik 
State-Changed-When: Fri Jun 15 03:48:33 PDT 2001 
State-Changed-Why:  
Sorted and closed (I believe). 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=25735 
>Unformatted:
