Skip to content

Commit f260c6b

Browse files
phil-blaingitster
authored andcommitted
t5572: describe '--rebase' tests a little more
It can be hard at first glance to distinguish what is different between the two tests 'recursive rebasing pull' and 'pull rebase recursing fails with conflicts' in 't5572-pull-submodule.sh', and to understand how they relate to the scenarios described in a6d7eb2 (pull: optionally rebase submodules (remote submodule changes only), 2017-06-23), which implemented '--recurse-submodules' for 'git pull' and added these tests. Rename the tests to be more descriptive and add some bullet points comments describing the different scenarios. Signed-off-by: Philippe Blain <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ba58ddd commit f260c6b

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

t/t5572-pull-submodule.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,12 @@ test_expect_success " --[no-]recurse-submodule and submodule.recurse" '
101101
test_path_is_file super/sub/merge_strategy_4.t
102102
'
103103

104-
test_expect_success 'recursive rebasing pull' '
104+
test_expect_success 'pull --rebase --recurse-submodules (remote superproject submodule changes, local submodule changes)' '
105+
# This tests the following scenario :
106+
# - local submodule has new commits
107+
# - local superproject does not have new commits
108+
# - upstream superproject has new commits that change the submodule pointer
109+
105110
# change upstream
106111
test_commit -C child rebase_strategy &&
107112
git -C parent submodule update --remote &&
@@ -116,7 +121,10 @@ test_expect_success 'recursive rebasing pull' '
116121
test_path_is_file super/sub/local_stuff.t
117122
'
118123

119-
test_expect_success 'pull rebase recursing fails with conflicts' '
124+
test_expect_success 'pull --rebase --recurse-submodules fails if both sides record submodule changes' '
125+
# This tests the following scenario :
126+
# - local superproject has new commits that change the submodule pointer
127+
# - upstream superproject has new commits that change the submodule pointer
120128
121129
# local changes in submodule recorded in superproject:
122130
test_commit -C super/sub local_stuff_2 &&

0 commit comments

Comments
 (0)