summaryrefslogtreecommitdiff
path: root/usr.bin/patch/patch.c
diff options
context:
space:
mode:
authordholland <dholland@NetBSD.org>2021-09-20 23:22:36 +0000
committerdholland <dholland@NetBSD.org>2021-09-20 23:22:36 +0000
commit96ba1207d376741acb7ce2c8c9f84ca91bc6d2d1 (patch)
treeda9e9b945342e95339a993c359bfc6cc900aef63 /usr.bin/patch/patch.c
parentee50eaf2f34b614db08df49c2020d70eda2b352f (diff)
Fix the message that appears if you patch -R an unapplied patch.
Diffstat (limited to 'usr.bin/patch/patch.c')
-rw-r--r--usr.bin/patch/patch.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/patch/patch.c b/usr.bin/patch/patch.c
index df62ca868b2..a6bf295a8e0 100644
--- a/usr.bin/patch/patch.c
+++ b/usr.bin/patch/patch.c
@@ -1,7 +1,7 @@
/*
* $OpenBSD: patch.c,v 1.45 2007/04/18 21:52:24 sobrado Exp $
* $DragonFly: src/usr.bin/patch/patch.c,v 1.10 2008/08/10 23:39:56 joerg Exp $
- * $NetBSD: patch.c,v 1.32 2021/05/25 11:25:59 cjep Exp $
+ * $NetBSD: patch.c,v 1.33 2021/09/20 23:22:36 dholland Exp $
*/
/*
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: patch.c,v 1.32 2021/05/25 11:25:59 cjep Exp $");
+__RCSID("$NetBSD: patch.c,v 1.33 2021/09/20 23:22:36 dholland Exp $");
#include <sys/types.h>
#include <sys/stat.h>
@@ -284,12 +284,14 @@ main(int argc, char *argv[])
skip_rest_of_patch = true;
} else if (batch) {
if (verbose)
- say("%seversed (or previously applied) patch detected! %s -R.",
+ say("%seversed (or %spreviously applied) patch detected! %s -R.",
reverse ? "R" : "Unr",
+ reverse ? "" : "not ",
reverse ? "Assuming" : "Ignoring");
} else {
- ask("%seversed (or previously applied) patch detected! %s -R? [y] ",
+ ask("%seversed (or %spreviously applied) patch detected! %s -R? [y] ",
reverse ? "R" : "Unr",
+ reverse ? "" : "not ",
reverse ? "Assume" : "Ignore");
if (*buf == 'n') {
ask("Apply anyway? [n] ");