summaryrefslogtreecommitdiff
path: root/sequencer.c
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2017-01-02 15:34:34 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-01-09 22:57:30 (GMT)
commitb3fdd581ae0e8793b8a1dabbee19334067229888 (patch)
tree998f5b0a718c9a290d1952de05716f3e81256e58 /sequencer.c
parent9d7bf3cf993ab59e0f9d7150534213f57dd12741 (diff)
downloadgit-b3fdd581ae0e8793b8a1dabbee19334067229888.zip
git-b3fdd581ae0e8793b8a1dabbee19334067229888.tar.gz
git-b3fdd581ae0e8793b8a1dabbee19334067229888.tar.bz2
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>
Diffstat (limited to 'sequencer.c')
-rw-r--r--sequencer.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sequencer.c b/sequencer.c
index dd5b843..6e92f18 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -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)