bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Disable continue by default in commit


From: Pavel Roskin
Subject: Disable continue by default in commit
Date: Mon, 5 Mar 2001 12:55:35 -0500 (EST)

Hello!

If the user doesn't enter any log, [s]he is asked whether to commit
anyway. It's likely that the user has changed his/her mind and has quitted
editor to make more changes. But [s]he is just one Enter away from
committing the change without log.

It is not a good idea to go ahead by default. I find it quite dangerous to
continue if the user just pressed Enter.

_______________________
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,7 @@
+2001-03-05  Pavel Roskin  <address@hidden>
+
+       * logmsg.c (do_editor): Empty input should not default to "continue".
+
 2001-02-28  Jim Meyering  <address@hidden>

        * commit.c (commit_usage): Use `-F logfile' (rather than -F file') in
--- logmsg.c
+++ logmsg.c
@@ -346,7 +346,7 @@
        {
            (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: ");
            (void) fflush (stdout);
            line_length = getline (&line, &line_chars_allocated, stdin);
            if (line_length < 0)
@@ -358,7 +358,7 @@
                error (1, 0, "aborting");
            }
            else if (line_length == 0
-                    || *line == '\n' || *line == 'c' || *line == 'C')
+                    || *line == 'c' || *line == 'C')
                break;
            if (*line == 'a' || *line == 'A')
                {
_______________________

Regards,
Pavel Roskin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]