Date: Mon, 12 Mar 2001 06:50:03 -0800 (PST) From: Nik Clayton <nik@freebsd.org> To: freebsd-doc@freebsd.org Subject: Re: docs/25735: handbook correction Message-ID: <200103121450.f2CEo3r95594@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR docs/25735; it has been noted by GNATS. 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-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200103121450.f2CEo3r95594>