From owner-freebsd-doc Wed Jul 19 13:30: 7 2000 Delivered-To: freebsd-doc@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 1F93B37B5EE for ; Wed, 19 Jul 2000 13:30:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id NAA04051; Wed, 19 Jul 2000 13:30:00 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from cauchy.math.missouri.edu (cauchy.math.missouri.edu [128.206.49.166]) by hub.freebsd.org (Postfix) with ESMTP id B532937C039 for ; 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 Reply-To: stephen@cauchy.math.missouri.edu To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: docs/20044: which order to put files in diff for patch? Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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