diff options
author | Justin T. Gibbs <gibbs@FreeBSD.org> | 1995-09-14 04:33:35 +0000 |
---|---|---|
committer | Justin T. Gibbs <gibbs@FreeBSD.org> | 1995-09-14 04:33:35 +0000 |
commit | 312b98f6bb2c42c80af4a9bf8451845afd6721e4 (patch) | |
tree | c8cf96641c950e6cba55d418c48f9baac3d44d13 /gnu/usr.bin/patch | |
parent | f3ebe76761d93682d9e188b778663149bf2bb553 (diff) | |
download | src-312b98f6bb2c42c80af4a9bf8451845afd6721e4.tar.gz src-312b98f6bb2c42c80af4a9bf8451845afd6721e4.zip |
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.
Notes
Notes:
svn path=/head/; revision=10723
Diffstat (limited to 'gnu/usr.bin/patch')
-rw-r--r-- | gnu/usr.bin/patch/pch.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gnu/usr.bin/patch/pch.c b/gnu/usr.bin/patch/pch.c index 98f1dd4ea615..0a40bfab4a4b 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); |