From stephen@cauchy.math.missouri.edu  Wed Jul 19 13:23:57 2000
Return-Path: <stephen@cauchy.math.missouri.edu>
Received: from cauchy.math.missouri.edu (cauchy.math.missouri.edu [128.206.49.166])
	by hub.freebsd.org (Postfix) with ESMTP id B532937C039
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 19 Jul 2000 13:23:54 -0700 (PDT)
	(envelope-from stephen@cauchy.math.missouri.edu)
Received: (from stephen@localhost)
	by cauchy.math.missouri.edu (8.9.3/8.9.1) id PAA15960;
	Wed, 19 Jul 2000 15:22:15 -0500 (CDT)
Message-Id: <200007192022.PAA15960@cauchy.math.missouri.edu>
Date: Wed, 19 Jul 2000 15:22:15 -0500 (CDT)
From: Stephen Montgomery-Smith <stephen@cauchy.math.missouri.edu>
Reply-To: stephen@cauchy.math.missouri.edu
To: FreeBSD-gnats-submit@freebsd.org
Subject: which order to put files in diff for patch?
X-Send-Pr-Version: 3.2

>Number:         20044
>Category:       docs
>Synopsis:       which order to put files in diff for patch?
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 19 13:30:00 PDT 2000
>Closed-Date:    Sun Jul 23 23:13:04 PDT 2000
>Last-Modified:  Sun Jul 23 23:14:10 PDT 2000
>Originator:     Stephen Montgomery-Smith
>Release:        FreeBSD 4.1-RC i386
>Organization:
University of Missouri
>Environment:

>Description:

If you are like me, when you create a patch, you don't know whether
to write
diff old-file new-file
or
diff new-file old-file
The man page for diff is not clear on this.
>How-To-Repeat:

man diff

>Fix:

Apply this patch to /usr/src/gnu/usr.bin/diff

--- diff-old.1	Wed Jul 19 12:08:31 2000
+++ diff.1	Wed Jul 19 12:25:07 2000
@@ -489,6 +489,19 @@
 and
 .I foo
 might be directory hierarchies or single files.
+
+If you are creating a patch file for
+.B patch
+to use, you should put the old file/directory first, and the 
+new file/directory second: for example
+
+.B diff
+-u old-file new-file
+
+or
+
+.B diff
+-ur old-directory new-directory
 .SH SEE ALSO
 cmp(1), comm(1), diff3(1), ed(1), patch(1), pr(1), sdiff(1).
 .SH DIAGNOSTICS


>Release-Note:
>Audit-Trail:

From: "Ogren, Eric C." <ecogren@rsasecurity.com>
To: "'stephen@cauchy.math.missouri.edu'" <stephen@cauchy.math.missouri.edu>,
	FreeBSD-gnats-submit@FreeBSD.ORG
Cc:  
Subject: RE: docs/20044: which order to put files in diff for patch?
Date: Wed, 19 Jul 2000 16:39:47 -0400

 Is this really that unclear? 
 
 Barring whether "from-file" and "to-file" doesn't make it clear enough,
 the first entry under EXAMPLES has a line 
 diff -crN foo.orig foo > foo.diff
 
 which I think makes it pretty clear which order to put files in.
 
 Eric
 
 > -----Original Message-----
 > From: Stephen Montgomery-Smith 
 > [mailto:stephen@cauchy.math.missouri.edu]
 > Sent: Wednesday, July 19, 2000 4:22 PM
 > To: FreeBSD-gnats-submit@FreeBSD.ORG
 > Subject: docs/20044: which order to put files in diff for patch?
 > 
 > 
 > 
 > >Number:         20044
 > >Category:       docs
 > >Synopsis:       which order to put files in diff for patch?
 > >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 Jul 19 13:30:00 PDT 2000
 > >Closed-Date:
 > >Last-Modified:
 > >Originator:     Stephen Montgomery-Smith
 > >Release:        FreeBSD 4.1-RC i386
 > >Organization:
 > University of Missouri
 > >Environment:
 > 
 > >Description:
 > 
 > If you are like me, when you create a patch, you don't know whether
 > to write
 > diff old-file new-file
 > or
 > diff new-file old-file
 > The man page for diff is not clear on this.
 > >How-To-Repeat:
 > 
 > man diff
 > 
 > >Fix:
 > 
 > Apply this patch to /usr/src/gnu/usr.bin/diff
 > 
 > --- diff-old.1	Wed Jul 19 12:08:31 2000
 > +++ diff.1	Wed Jul 19 12:25:07 2000
 > @@ -489,6 +489,19 @@
 >  and
 >  .I foo
 >  might be directory hierarchies or single files.
 > +
 > +If you are creating a patch file for
 > +.B patch
 > +to use, you should put the old file/directory first, and the 
 > +new file/directory second: for example
 > +
 > +.B diff
 > +-u old-file new-file
 > +
 > +or
 > +
 > +.B diff
 > +-ur old-directory new-directory
 >  .SH SEE ALSO
 >  cmp(1), comm(1), diff3(1), ed(1), patch(1), pr(1), sdiff(1).
 >  .SH DIAGNOSTICS
 > 
 > 
 > >Release-Note:
 > >Audit-Trail:
 > >Unformatted:
 >  Stephen Montgomery-Smith
 > 
 > 
 > To Unsubscribe: send mail to majordomo@FreeBSD.org
 > with "unsubscribe freebsd-doc" in the body of the message
 > 
 

From: Nik Clayton <nik@freebsd.org>
To: Stephen Montgomery-Smith <stephen@cauchy.math.missouri.edu>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: docs/20044: which order to put files in diff for patch?
Date: Fri, 21 Jul 2000 22:57:43 +0000

 On Wed, Jul 19, 2000 at 03:22:15PM -0500, Stephen Montgomery-Smith wrote:
 > If you are like me, when you create a patch, you don't know whether
 > to write
 > diff old-file new-file
 > or
 > diff new-file old-file
 
     cp old-file new-file
     
     mv old-file new-file
 
     ln old-file new-file
 
     diff old-file new-file
 
 Unix is pretty consistent about this stuff.
 
 N
 -- 
 Internet connection, $19.95 a month.  Computer, $799.95.  Modem, $149.95.
 Telephone line, $24.95 a month.  Software, free.  USENET transmission,
 hundreds if not thousands of dollars.  Thinking before posting, priceless.
 Somethings in life you can't buy.  For everything else, there's MasterCard.
   -- Graham Reed, in the Scary Devil Monastery
 
State-Changed-From-To: open->closed 
State-Changed-By: jim 
State-Changed-When: Sun Jul 23 23:13:04 PDT 2000 
State-Changed-Why:  
Not only has this been explained in the audit trail, it is also explained 
at http://www.FreeBSD.org/docproj/submitting.html. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=20044 
>Unformatted:
 Stephen Montgomery-Smith
