pull --rebase: compute rebase arguments in separate function
authorPhilippe Blain <levraiphilippeblain@gmail.com>
Sat, 14 Nov 2020 00:34:42 +0000 (00:34 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 17 Nov 2020 00:01:13 +0000 (16:01 -0800)
commit4f66d79ae301a74cead51e703d566ec5f395beb8
tree2bb433c73a6626878c20fb6b6b02c0ca2c367747
parent898f80736c75878acc02dc55672317fcc0e0a5a6
pull --rebase: compute rebase arguments in separate function

The function 'run_rebase' is responsible for constructing the
command line to be passed to 'git rebase'. This includes both forwarding
pass-through options given to 'git pull' as well computing the <newbase>
and <upstream> arguments to 'git rebase'.

A following commit will need to access the <upstream> argument in
'cmd_pull' to fix a bug with 'git pull --rebase --recurse-submodules'.
In order to do so, refactor the code so that the <newbase> and
<upstream> commits are computed in a new, separate function,
'get_rebase_newbase_and_upstream'.

Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/pull.c