summaryrefslogtreecommitdiff
path: root/builtin/revert.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-07-19 18:30:21 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-07-19 18:30:21 (GMT)
commitd97c62c828d6f0eb7ba7067c8c24793620900dd8 (patch)
tree53941cdc41e6ad573859ee63c570499b869fc967 /builtin/revert.c
parentb4b8c35729985a8f1f5e22f82259a2499efbc37a (diff)
parentdcb500dc16ce8db556b51e9a5b3fa977111d0443 (diff)
downloadgit-d97c62c828d6f0eb7ba7067c8c24793620900dd8.zip
git-d97c62c828d6f0eb7ba7067c8c24793620900dd8.tar.gz
git-d97c62c828d6f0eb7ba7067c8c24793620900dd8.tar.bz2
Merge branch 'ra/cherry-pick-revert-skip'
"git cherry-pick/revert" learned a new "--skip" action. * ra/cherry-pick-revert-skip: cherry-pick/revert: advise using --skip cherry-pick/revert: add --skip option sequencer: use argv_array in reset_merge sequencer: rename reset_for_rollback to reset_merge sequencer: add advice for revert
Diffstat (limited to 'builtin/revert.c')
-rw-r--r--builtin/revert.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/builtin/revert.c b/builtin/revert.c
index 4e71b2f..f61cc5d 100644
--- a/builtin/revert.c
+++ b/builtin/revert.c
@@ -102,6 +102,7 @@ static int run_sequencer(int argc, const char **argv, struct replay_opts *opts)
OPT_CMDMODE(0, "quit", &cmd, N_("end revert or cherry-pick sequence"), 'q'),
OPT_CMDMODE(0, "continue", &cmd, N_("resume revert or cherry-pick sequence"), 'c'),
OPT_CMDMODE(0, "abort", &cmd, N_("cancel revert or cherry-pick sequence"), 'a'),
+ OPT_CMDMODE(0, "skip", &cmd, N_("skip current commit and continue"), 's'),
OPT_CLEANUP(&cleanup_arg),
OPT_BOOL('n', "no-commit", &opts->no_commit, N_("don't automatically commit")),
OPT_BOOL('e', "edit", &opts->edit, N_("edit the commit message")),
@@ -151,6 +152,8 @@ static int run_sequencer(int argc, const char **argv, struct replay_opts *opts)
this_operation = "--quit";
else if (cmd == 'c')
this_operation = "--continue";
+ else if (cmd == 's')
+ this_operation = "--skip";
else {
assert(cmd == 'a');
this_operation = "--abort";
@@ -210,6 +213,8 @@ static int run_sequencer(int argc, const char **argv, struct replay_opts *opts)
return sequencer_continue(the_repository, opts);
if (cmd == 'a')
return sequencer_rollback(the_repository, opts);
+ if (cmd == 's')
+ return sequencer_skip(the_repository, opts);
return sequencer_pick_revisions(the_repository, opts);
}