summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/patch
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>1995-09-14 04:33:35 +0000
committergibbs <gibbs@FreeBSD.org>1995-09-14 04:33:35 +0000
commit4da885ab00168ae5e232c837acb7668cfee30baf (patch)
treec8cf96641c950e6cba55d418c48f9baac3d44d13 /gnu/usr.bin/patch
parentcc805a44bb65c33f97601196acb267363ae5cf22 (diff)
downloadFreeBSD-src-4da885ab00168ae5e232c837acb7668cfee30baf.zip
FreeBSD-src-4da885ab00168ae5e232c837acb7668cfee30baf.tar.gz
Give "Index" specified filenames preference over other filenames specified
in the diff. This makes it so that diffs containing files in different subdirectories that have the same name not patch the same file. For example a diff with patches to Makefile, des/Makefile, usr.bin/Makefile would attempt to patch Makefile three times.
Diffstat (limited to 'gnu/usr.bin/patch')
-rw-r--r--gnu/usr.bin/patch/pch.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gnu/usr.bin/patch/pch.c b/gnu/usr.bin/patch/pch.c
index 98f1dd4..0a40bfa 100644
--- a/gnu/usr.bin/patch/pch.c
+++ b/gnu/usr.bin/patch/pch.c
@@ -1,6 +1,9 @@
-/* $Header: /home/ncvs/src/gnu/usr.bin/patch/pch.c,v 1.4 1994/02/25 21:46:07 phk Exp $
+/* $Header: /home/ncvs/src/gnu/usr.bin/patch/pch.c,v 1.5 1995/05/30 05:02:35 rgrimes Exp $
*
* $Log: pch.c,v $
+ * Revision 1.5 1995/05/30 05:02:35 rgrimes
+ * Remove trailing whitespace.
+ *
* Revision 1.4 1994/02/25 21:46:07 phk
* added the -C/-check again.
*
@@ -355,12 +358,12 @@ intuit_diff_type()
else
filearg[0] = savestr(newname);
}
+ else if (indname)
+ filearg[0] = savestr(indname);
else if (oldname)
filearg[0] = savestr(oldname);
else if (newname)
filearg[0] = savestr(newname);
- else if (indname)
- filearg[0] = savestr(indname);
}
if (bestguess) {
free(bestguess);
OpenPOWER on IntegriCloud