sequencer (rebase -i): implement the 'drop' command
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Mon, 2 Jan 2017 15:34:34 +0000 (16:34 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 9 Jan 2017 22:57:30 +0000 (14:57 -0800)
The parsing part of a 'drop' command is almost identical to parsing a
'pick', while the operation is the same as that of a 'noop'.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sequencer.c
index dd5b843a841f6c46bcd44cf5d7a7aa5152fbfef4..6e92f186ae3a44516f255ba45ab2bdb8d82c7f2b 100644 (file)
@@ -736,7 +736,8 @@ enum todo_command {
        /* commands that do something else than handling a single commit */
        TODO_EXEC,
        /* commands that do nothing but are counted for reporting progress */
-       TODO_NOOP
+       TODO_NOOP,
+       TODO_DROP
 };
 
 static struct {
@@ -750,7 +751,8 @@ static struct {
        { 'f', "fixup" },
        { 's', "squash" },
        { 'x', "exec" },
-       { 0,   "noop" }
+       { 0,   "noop" },
+       { 'd', "drop" }
 };
 
 static const char *command_to_string(const enum todo_command command)
@@ -762,7 +764,7 @@ static const char *command_to_string(const enum todo_command command)
 
 static int is_noop(const enum todo_command command)
 {
-       return TODO_NOOP <= (size_t)command;
+       return TODO_NOOP <= command;
 }
 
 static int is_fixup(enum todo_command command)