Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhillip Wood <phillip.wood@dunelm.org.uk>2019-03-13 21:26:15 +0300
committerJunio C Hamano <gitster@pobox.com>2019-03-18 10:43:13 +0300
commit6860ce5d8e461e5997029abe73c39590d349cef9 (patch)
tree92be4811146b93c1665c16d69430d21e45cd571d /sequencer.c
parent36b0503a19c777b57805aa26aabd77f99dbf91b7 (diff)
cherry-pick --continue: remember options
Remember --allow-empty, --allow-empty-message and --keep-redundant-commits when cherry-pick stops for a conflict resolution. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sequencer.c')
-rw-r--r--sequencer.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/sequencer.c b/sequencer.c
index 4941e48c35..e4941d6e17 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -2308,6 +2308,15 @@ static int populate_opts_cb(const char *key, const char *value, void *data)
opts->no_commit = git_config_bool_or_int(key, value, &error_flag);
else if (!strcmp(key, "options.edit"))
opts->edit = git_config_bool_or_int(key, value, &error_flag);
+ else if (!strcmp(key, "options.allow-empty"))
+ opts->allow_empty =
+ git_config_bool_or_int(key, value, &error_flag);
+ else if (!strcmp(key, "options.allow-empty-message"))
+ opts->allow_empty_message =
+ git_config_bool_or_int(key, value, &error_flag);
+ else if (!strcmp(key, "options.keep-redundant-commits"))
+ opts->keep_redundant_commits =
+ git_config_bool_or_int(key, value, &error_flag);
else if (!strcmp(key, "options.signoff"))
opts->signoff = git_config_bool_or_int(key, value, &error_flag);
else if (!strcmp(key, "options.record-origin"))
@@ -2706,6 +2715,15 @@ static int save_opts(struct replay_opts *opts)
if (opts->edit)
res |= git_config_set_in_file_gently(opts_file,
"options.edit", "true");
+ if (opts->allow_empty)
+ res |= git_config_set_in_file_gently(opts_file,
+ "options.allow-empty", "true");
+ if (opts->allow_empty_message)
+ res |= git_config_set_in_file_gently(opts_file,
+ "options.allow-empty-message", "true");
+ if (opts->keep_redundant_commits)
+ res |= git_config_set_in_file_gently(opts_file,
+ "options.keep-redundant-commits", "true");
if (opts->signoff)
res |= git_config_set_in_file_gently(opts_file,
"options.signoff", "true");