diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2016-08-16 18:57:11 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2016-08-16 18:57:11 +0000 |
commit | 1e48c7faa2f5ad0f78aa7d2159e14d7870ad1277 (patch) | |
tree | 7b453ac100fe461527c4f24f174ca2291ae2382b | |
parent | ae066bd0c1f43b493bf0e94b324a3f802a600196 (diff) |
When the commit message is empty, don't default to c)ontinue
(committing without log message), but to a)bort.
ok jcs, natano; millert and tj agree
-rw-r--r-- | gnu/usr.bin/cvs/src/logmsg.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gnu/usr.bin/cvs/src/logmsg.c b/gnu/usr.bin/cvs/src/logmsg.c index ee7f90ed796..d46a6a9811e 100644 --- a/gnu/usr.bin/cvs/src/logmsg.c +++ b/gnu/usr.bin/cvs/src/logmsg.c @@ -346,7 +346,7 @@ do_editor (dir, messagep, repository, changes) { (void) printf ("\nLog message unchanged or not specified\n"); (void) printf ("a)bort, c)ontinue, e)dit, !)reuse this message unchanged for remaining dirs\n"); - (void) printf ("Action: (continue) "); + (void) printf ("Action: (abort) "); (void) fflush (stdout); line_length = get_line (&line, &line_chars_allocated, stdin); if (line_length < 0) @@ -358,14 +358,14 @@ do_editor (dir, messagep, repository, changes) error (1, 0, "aborting"); } else if (line_length == 0 - || *line == '\n' || *line == 'c' || *line == 'C') - break; - if (*line == 'a' || *line == 'A') + || *line == '\n' || *line == 'a' || *line == 'A') { if (unlink_file (fname) < 0) error (0, errno, "warning: cannot remove temp file %s", fname); error (1, 0, "aborted by user"); } + if (*line == 'c' || *line == 'C') + break; if (*line == 'e' || *line == 'E') goto again; if (*line == '!') |