diff options
author | Phillip Wood <phillip.wood@dunelm.org.uk> | 2017-08-02 12:44:17 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-08-03 00:16:09 +0200 |
commit | 9b6d7a6245e3be34a50a94a1174d8aebf5b1a263 (patch) | |
tree | ada9dbb48cea17aa8df9e45192fafdac35e1fc0b /sequencer.c | |
parent | rebase: honor --rerere-autoupdate (diff) | |
download | git-9b6d7a6245e3be34a50a94a1174d8aebf5b1a263.tar.xz git-9b6d7a6245e3be34a50a94a1174d8aebf5b1a263.zip |
rebase -i: honor --rerere-autoupdate
Interactive rebase was ignoring '--rerere-autoupdate'. Fix this by
reading it appropriate file when restoring the sequencer state for an
interactive rebase and passing '--rerere-autoupdate' to merge and
cherry-pick when rebasing with '--preserve-merges'.
Reported-by: Junio C Hamano <gitster@pobox.com>
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, 10 insertions, 0 deletions
diff --git a/sequencer.c b/sequencer.c index 3010faf863..7dc0670d90 100644 --- a/sequencer.c +++ b/sequencer.c @@ -127,6 +127,7 @@ static GIT_PATH_FUNC(rebase_path_onto, "rebase-merge/onto") static GIT_PATH_FUNC(rebase_path_autostash, "rebase-merge/autostash") static GIT_PATH_FUNC(rebase_path_strategy, "rebase-merge/strategy") static GIT_PATH_FUNC(rebase_path_strategy_opts, "rebase-merge/strategy_opts") +static GIT_PATH_FUNC(rebase_path_allow_rerere_autoupdate, "rebase-merge/allow_rerere_autoupdate") static inline int is_rebase_i(const struct replay_opts *opts) { @@ -1479,6 +1480,15 @@ static int read_populate_opts(struct replay_opts *opts) free(opts->gpg_sign); opts->gpg_sign = xstrdup(buf.buf + 2); } + strbuf_reset(&buf); + } + + if (read_oneliner(&buf, rebase_path_allow_rerere_autoupdate(), 1)) { + if (!strcmp(buf.buf, "--rerere-autoupdate")) + opts->allow_rerere_auto = RERERE_AUTOUPDATE; + else if (!strcmp(buf.buf, "--no-rerere-autoupdate")) + opts->allow_rerere_auto = RERERE_NOAUTOUPDATE; + strbuf_reset(&buf); } if (file_exists(rebase_path_verbose())) |