sequencer (rebase -i): implement the 'drop' command
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>
Johannes Schindelin committed
Jan 2, 2017 at 16:34 UTC
b3fdd581ae0e8793b8a1dabbee19334067229888
1 file changed
+5
-3
sequencer.c
+5
-3
@@ -736,7 +736,8 @@ enum todo_command {
736
/* commands that do something else than handling a single commit */
737
TODO_EXEC,
738
/* commands that do nothing but are counted for reporting progress */
739
- TODO_NOOP
739
+ TODO_NOOP,
740
+ TODO_DROP
741
};
742
743
static struct {
@@ -750,7 +751,8 @@ static struct {
751
{ 'f', "fixup" },
752
{ 's', "squash" },
753
{ 'x', "exec" },
753
- { 0, "noop" }
754
+ { 0, "noop" },
755
+ { 'd', "drop" }
756
};
757
758
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)
764
765
static int is_noop(const enum todo_command command)
766
{
765
- return TODO_NOOP <= (size_t)command;
767
+ return TODO_NOOP <= command;
768
}
769
770
static int is_fixup(enum todo_command command)