summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortb <tb@openbsd.org>2016-08-16 19:00:59 +0000
committertb <tb@openbsd.org>2016-08-16 19:00:59 +0000
commit3e379626a5604435332eb9f6fb9ed362bbbc85bf (patch)
treefe0efd63d51877c464d00c576a9b527ef2df6259
parentWhen the commit message is empty, don't default to c)ontinue (diff)
downloadwireguard-openbsd-3e379626a5604435332eb9f6fb9ed362bbbc85bf.tar.xz
wireguard-openbsd-3e379626a5604435332eb9f6fb9ed362bbbc85bf.zip
When the commit message is empty, don't default to c)ontinue
(committing without log message) but a)bort. Also, accept the uppercase versions of the choices. Matches the corresponding change of behavior of GNU cvs. suggested by & ok jcs
-rw-r--r--usr.bin/cvs/logmsg.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/cvs/logmsg.c b/usr.bin/cvs/logmsg.c
index 281112c86a6..4ede5049fa8 100644
--- a/usr.bin/cvs/logmsg.c
+++ b/usr.bin/cvs/logmsg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: logmsg.c,v 1.57 2015/11/05 09:48:21 nicm Exp $ */
+/* $OpenBSD: logmsg.c,v 1.58 2016/08/16 19:00:59 tb Exp $ */
/*
* Copyright (c) 2007 Joris Vink <joris@openbsd.org>
*
@@ -221,18 +221,18 @@ cvs_logmsg_create(char *dir, struct cvs_flisthead *added,
printf("\nLog message unchanged or not specified\n"
"a)bort, c)ontinue, e)dit, !)reuse this message "
- "unchanged for remaining dirs\nAction: (continue) ");
+ "unchanged for remaining dirs\nAction: (abort) ");
(void)fflush(stdout);
c = getc(stdin);
- if (c == EOF || c == 'a') {
+ if (c == EOF || c == '\n' || c == 'a' || c == 'A') {
fatal("Aborted by user");
- } else if (c == '\n' || c == 'c') {
+ } else if (c == 'c' || c == 'C') {
if (prevmsg == NULL)
prevmsg = xstrdup("");
logmsg = xstrdup(prevmsg);
break;
- } else if (c == 'e') {
+ } else if (c == 'e' || c == 'E') {
continue;
} else if (c == '!') {
reuse = 1;