diff options
author | 1997-04-03 07:07:36 +0000 | |
---|---|---|
committer | 1997-04-03 07:07:36 +0000 | |
commit | 14a87c9e7b39ad2a69c63f6450363ca65732a752 (patch) | |
tree | 705afd2bb94cc6aa5112c4c9db55c1fc9582fddc /usr.bin/patch | |
parent | BUGS section no longer applies, the new resolver implements network (diff) | |
download | wireguard-openbsd-14a87c9e7b39ad2a69c63f6450363ca65732a752.tar.xz wireguard-openbsd-14a87c9e7b39ad2a69c63f6450363ca65732a752.zip |
From FreeBSD 1.7 by markm. The log message:
Priorities were broken. If there was an Index: line and ***/--- lines
with valid names, the ***/---names were taken first.
this broke eg:
Index: foo/Makefile
==========
RCS <blah>
Retrieving <blah>
diff <blah>
*** Makefile <blah>
--- Makefile <blah>
By trying to patch the Makefile in the _curent_ directory, rather than
the one in the foo/ directory.
Diffstat (limited to 'usr.bin/patch')
-rw-r--r-- | usr.bin/patch/pch.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/patch/pch.c b/usr.bin/patch/pch.c index abed3936332..c5f57bdfb37 100644 --- a/usr.bin/patch/pch.c +++ b/usr.bin/patch/pch.c @@ -1,7 +1,7 @@ -/* $OpenBSD: pch.c,v 1.7 1996/09/24 04:19:29 millert Exp $ */ +/* $OpenBSD: pch.c,v 1.8 1997/04/03 07:07:36 imp Exp $ */ #ifndef lint -static char rcsid[] = "$OpenBSD: pch.c,v 1.7 1996/09/24 04:19:29 millert Exp $"; +static char rcsid[] = "$OpenBSD: pch.c,v 1.8 1997/04/03 07:07:36 imp Exp $"; #endif /* not lint */ #include "EXTERN.h" @@ -306,7 +306,9 @@ intuit_diff_type() oldname = fetchname(oldtmp, strippath, ok_to_create_file); if (newtmp != Nullch) newname = fetchname(newtmp, strippath, ok_to_create_file); - if (oldname && newname) { + if (indname) + filearg[0] = savestr(indname); + else if (oldname && newname) { if (strlen(oldname) < strlen(newname)) filearg[0] = savestr(oldname); else @@ -316,8 +318,6 @@ intuit_diff_type() filearg[0] = savestr(oldname); else if (newname) filearg[0] = savestr(newname); - else if (indname) - filearg[0] = savestr(indname); } if (bestguess) { free(bestguess); |