aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/rebase.c
diff options
context:
space:
mode:
authorAlban Gruin <alban.gruin@gmail.com>2019-11-24 18:43:31 +0100
committerJunio C Hamano <gitster@pobox.com>2019-11-25 12:24:49 +0900
commita2dd67f10523d3593f404b9889b6318f75ab988c (patch)
tree4d4f5e3687fbb38cbd05bcc4476392e4da2954e9 /builtin/rebase.c
parent3f34f2d8a4da82ddda48a591cbb091f24a5f3e58 (diff)
downloadgit-a2dd67f10523d3593f404b9889b6318f75ab988c.tar.gz
rebase: fill `squash_onto' in get_replay_opts()
When sequencer_continue() is called by complete_action(), `opts' has been filled by get_replay_opts(). Currently, it does not initialise the `squash_onto' field (used by the `--root' mode), only read_populate_opts() does. It’s not a problem yet since sequencer_continue() calls it before pick_commits(), but it would lead to incorrect results once complete_action() is modified to call pick_commits() directly. Let’s change that. Signed-off-by: Alban Gruin <alban.gruin@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/rebase.c')
-rw-r--r--builtin/rebase.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/builtin/rebase.c b/builtin/rebase.c
index 4a20582e72..b171c86e3d 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -117,6 +117,11 @@ static struct replay_opts get_replay_opts(const struct rebase_options *opts)
if (opts->strategy_opts)
parse_strategy_opts(&replay, opts->strategy_opts);
+ if (opts->squash_onto) {
+ oidcpy(&replay.squash_onto, opts->squash_onto);
+ replay.have_squash_onto = 1;
+ }
+
return replay;
}