diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2017-01-23 23:52:18 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-01-25 14:49:32 -0800 |
commit | 37238601cde1bf445553e120ce8600910fdb530c (patch) | |
tree | ba31a12c778f39e38689b18ee7aab0fdfc103d69 | |
parent | 1041fcccecd8502e1b5ee8e5637f505c5600e1a4 (diff) | |
download | git-37238601cde1bf445553e120ce8600910fdb530c.tar.gz |
sequencer: save/load all options
Add the missing replay_opts to save_opts and populate_opts, so that an
interrupted cherry-pick will continue with the same setup it had before
the interruption.
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | sequencer.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sequencer.c b/sequencer.c index 672c81b559..3d2f61c979 100644 --- a/sequencer.c +++ b/sequencer.c @@ -985,6 +985,14 @@ static int populate_opts_cb(const char *key, const char *value, void *data) opts->signoff = git_config_bool_or_int(key, value, &error_flag); else if (!strcmp(key, "options.allow-ff")) opts->allow_ff = git_config_bool_or_int(key, value, &error_flag); + else if (!strcmp(key, "options.rerere-autoupdate")) + opts->allow_rerere_auto = 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.mainline")) opts->mainline = git_config_int(key, value); else if (!strcmp(key, "options.gpg-sign")) @@ -1233,6 +1241,14 @@ static int save_opts(struct replay_opts *opts) res |= git_config_set_in_file_gently(opts_file, "options.signoff", "true"); if (opts->allow_ff) res |= git_config_set_in_file_gently(opts_file, "options.allow-ff", "true"); + if (opts->allow_rerere_auto) + res |= git_config_set_in_file_gently(opts_file, "options.rerere-autoupdate", "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->mainline) { struct strbuf buf = STRBUF_INIT; strbuf_addf(&buf, "%d", opts->mainline); |