]> git.ipfire.org Git - thirdparty/git.git/commit - builtin/rebase.c
rebase: factor out branch_base calculation
authorPhillip Wood <phillip.wood@dunelm.org.uk>
Mon, 17 Oct 2022 13:17:43 +0000 (13:17 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 17 Oct 2022 18:53:03 +0000 (11:53 -0700)
commitd42c9ffa0fa169ea51c971d1143b3f20d5a32d83
tree670db8493a3703857a621bb02acfe6f0dd5af374
parenta77060218dfae5e8209a0ee131f292b881ce533b
rebase: factor out branch_base calculation

Separate out calculating the merge base between 'onto' and 'HEAD' from
the check for whether we can fast-forward or not. This means we can skip
the fast-forward checks when the rebase is forced and avoid calculating
the merge-base between 'HEAD' and 'onto' when --keep-base is given.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/rebase.c