This is one of the quirks of cvs that I have a hard time getting used to:

$ cvs commit
<quit $EDITOR without writing the log message to disk>
Log message unchanged or not specified
a)bort, c)ontinue, e)dit, !)reuse this message unchanged for remaining dirs
Action: (continue)

I don't think I'll ever want to c)ontinue here because I don't want to
commit anything without a log message.  I exit the editor without
writing the log file precisely because there might be something wrong,
something I need to go double check.  In that situation, I don't need
the extra thrill of making sure that I choose a non-default option so I
don't change anything.

Thus, I suggest to default to abort here.

Index: src/logmsg.c
===================================================================
RCS file: /var/cvs/src/gnu/usr.bin/cvs/src/logmsg.c,v
retrieving revision 1.4
diff -u -p -r1.4 logmsg.c
--- src/logmsg.c        4 Mar 2012 04:05:15 -0000       1.4
+++ src/logmsg.c        15 Aug 2016 03:25:27 -0000
@@ -346,7 +346,7 @@ do_editor (dir, messagep, repository, ch
        {
            (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, ch
                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 == '!')

Reply via email to