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
This commit is contained in:
@ -24,6 +24,7 @@
|
||||
#include "lockfile.h"
|
||||
#include "wt-status.h"
|
||||
#include "commit-reach.h"
|
||||
#include "sequencer.h"
|
||||
|
||||
enum rebase_type {
|
||||
REBASE_INVALID = -1,
|
||||
@ -101,6 +102,7 @@ static char *opt_signoff;
|
||||
static char *opt_squash;
|
||||
static char *opt_commit;
|
||||
static char *opt_edit;
|
||||
static char *cleanup_arg;
|
||||
static char *opt_ff;
|
||||
static char *opt_verify_signatures;
|
||||
static int opt_autostash = -1;
|
||||
@ -168,6 +170,7 @@ static struct option pull_options[] = {
|
||||
OPT_PASSTHRU(0, "edit", &opt_edit, NULL,
|
||||
N_("edit message before committing"),
|
||||
PARSE_OPT_NOARG),
|
||||
OPT_CLEANUP(&cleanup_arg),
|
||||
OPT_PASSTHRU(0, "ff", &opt_ff, NULL,
|
||||
N_("allow fast-forward"),
|
||||
PARSE_OPT_NOARG),
|
||||
@ -645,6 +648,8 @@ static int run_merge(void)
|
||||
argv_array_push(&args, opt_commit);
|
||||
if (opt_edit)
|
||||
argv_array_push(&args, opt_edit);
|
||||
if (cleanup_arg)
|
||||
argv_array_pushf(&args, "--cleanup=%s", cleanup_arg);
|
||||
if (opt_ff)
|
||||
argv_array_push(&args, opt_ff);
|
||||
if (opt_verify_signatures)
|
||||
@ -876,6 +881,13 @@ int cmd_pull(int argc, const char **argv, const char *prefix)
|
||||
|
||||
argc = parse_options(argc, argv, prefix, pull_options, pull_usage, 0);
|
||||
|
||||
if (cleanup_arg)
|
||||
/*
|
||||
* this only checks the validity of cleanup_arg; we don't need
|
||||
* a valid value for use_editor
|
||||
*/
|
||||
get_cleanup_mode(cleanup_arg, 0);
|
||||
|
||||
parse_repo_refspecs(argc, argv, &repo, &refspecs);
|
||||
|
||||
if (!opt_ff)
|
||||
|
Reference in New Issue
Block a user