Skip to content

Commit a2dd67f

Browse files
agrngitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3f34f2d commit a2dd67f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

builtin/rebase.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,11 @@ static struct replay_opts get_replay_opts(const struct rebase_options *opts)
117117
if (opts->strategy_opts)
118118
parse_strategy_opts(&replay, opts->strategy_opts);
119119

120+
if (opts->squash_onto) {
121+
oidcpy(&replay.squash_onto, opts->squash_onto);
122+
replay.have_squash_onto = 1;
123+
}
124+
120125
return replay;
121126
}
122127

0 commit comments

Comments
 (0)