Date: Wed, 19 Jul 2000 15:22:15 -0500 (CDT) From: Stephen Montgomery-Smith <stephen@cauchy.math.missouri.edu> To: FreeBSD-gnats-submit@freebsd.org Subject: docs/20044: which order to put files in diff for patch? Message-ID: <200007192022.PAA15960@cauchy.math.missouri.edu>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200007192022.PAA15960>