diff options
author | Phillip Wood <phillip.wood@dunelm.org.uk> | 2017-08-02 11:44:19 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-08-02 15:16:09 -0700 |
commit | 8d8cb4b047cef546ea80b8224c7b33707f6d6a4c (patch) | |
tree | 1f322b953e16e9fc879560a0fc81c67b81042ba0 /sequencer.c | |
parent | 6f0e577e46619a15baefc48192abee34451effa5 (diff) | |
download | git-8d8cb4b047cef546ea80b8224c7b33707f6d6a4c.tar.gz |
cherry-pick/revert: remember --rerere-autoupdate
When continuing after conflicts, cherry-pick forgot if the user had specified
'--rerere-autoupdate'.
Redo the cherry-pick rerere tests to check --rerere-autoupdate works
as expected.
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.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sequencer.c b/sequencer.c index 7dc0670d90..e0e66b987b 100644 --- a/sequencer.c +++ b/sequencer.c @@ -1439,7 +1439,11 @@ static int populate_opts_cb(const char *key, const char *value, void *data) else if (!strcmp(key, "options.strategy-option")) { ALLOC_GROW(opts->xopts, opts->xopts_nr + 1, opts->xopts_alloc); opts->xopts[opts->xopts_nr++] = xstrdup(value); - } else + } else if (!strcmp(key, "options.allow-rerere-auto")) + opts->allow_rerere_auto = + git_config_bool_or_int(key, value, &error_flag) ? + RERERE_AUTOUPDATE : RERERE_NOAUTOUPDATE; + else return error(_("invalid key: %s"), key); if (!error_flag) @@ -1752,6 +1756,10 @@ static int save_opts(struct replay_opts *opts) "options.strategy-option", opts->xopts[i], "^$", 0); } + if (opts->allow_rerere_auto) + res |= git_config_set_in_file_gently(opts_file, "options.allow-rerere-auto", + opts->allow_rerere_auto == RERERE_AUTOUPDATE ? + "true" : "false"); return res; } |