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>
This commit is contained in:
Johannes Schindelin
2016-04-13 15:18:29 +02:00
parent 30e02629ff
commit 839a3ebfa2

View File

@@ -783,7 +783,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 {
@@ -797,7 +798,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)
@@ -809,7 +811,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)