diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-05-08 15:37:24 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-05-08 15:37:24 (GMT) |
commit | b877cb4a7ec2fafd03b6a3a70c26370744a32c1b (patch) | |
tree | 841a4389aea1aef57d9278bec5f966de5bb1ef7e /builtin/revert.c | |
parent | f757794d9dbd1152c0a557d3a07617ac2fa5bc09 (diff) | |
parent | 1a2b985fb375e7ce14932bfc59365024af2fb6ab (diff) | |
download | git-b877cb4a7ec2fafd03b6a3a70c26370744a32c1b.zip git-b877cb4a7ec2fafd03b6a3a70c26370744a32c1b.tar.gz git-b877cb4a7ec2fafd03b6a3a70c26370744a32c1b.tar.bz2 |
Merge branch 'dl/merge-cleanup-scissors-fix'
The list of conflicted paths shown in the editor while concluding a
conflicted merge was shown above the scissors line when the
clean-up mode is set to "scissors", even though it was commented
out just like the list of updated paths and other information to
help the user explain the merge better.
* dl/merge-cleanup-scissors-fix:
cherry-pick/revert: add scissors line on merge conflict
sequencer.c: save and restore cleanup mode
merge: add scissors line on merge conflict
merge: cleanup messages like commit
parse-options.h: extract common --cleanup option
commit: extract cleanup_mode functions to sequencer
t7502: clean up style
t7604: clean up style
t3507: clean up style
t7600: clean up style
Diffstat (limited to 'builtin/revert.c')
-rw-r--r-- | builtin/revert.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/builtin/revert.c b/builtin/revert.c index a47b53c..d4dcedb 100644 --- a/builtin/revert.c +++ b/builtin/revert.c @@ -96,11 +96,13 @@ static int run_sequencer(int argc, const char **argv, struct replay_opts *opts) { const char * const * usage_str = revert_or_cherry_pick_usage(opts); const char *me = action_name(opts); + const char *cleanup_arg = NULL; int cmd = 0; struct option base_options[] = { 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_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")), OPT_NOOP_NOARG('r', NULL), @@ -137,6 +139,11 @@ static int run_sequencer(int argc, const char **argv, struct replay_opts *opts) if (opts->keep_redundant_commits) opts->allow_empty = 1; + if (cleanup_arg) { + opts->default_msg_cleanup = get_cleanup_mode(cleanup_arg, 1); + opts->explicit_cleanup = 1; + } + /* Check for incompatible command line arguments */ if (cmd) { char *this_operation; |