From 3e379626a5604435332eb9f6fb9ed362bbbc85bf Mon Sep 17 00:00:00 2001 From: tb Date: Tue, 16 Aug 2016 19:00:59 +0000 Subject: [PATCH] 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 --- usr.bin/cvs/logmsg.c | 10 +++++----- 1 file 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 * @@ -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; -- 2.20.1