Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Blain <levraiphilippeblain@gmail.com>2020-11-14 03:34:44 +0300
committerJunio C Hamano <gitster@pobox.com>2020-11-17 03:01:13 +0300
commitf260c6b46c1ebb5b1b4dfffd8812b5416cfcc4e7 (patch)
tree654d6824940b3f9599e4e7d366e23dc8d4061474 /t/t5572-pull-submodule.sh
parentba58ddd0bf295f45361cdcddd07a2d0183dde4bd (diff)
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 a6d7eb2c7a (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 <levraiphilippeblain@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5572-pull-submodule.sh')
-rwxr-xr-xt/t5572-pull-submodule.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/t/t5572-pull-submodule.sh b/t/t5572-pull-submodule.sh
index 7f658dba6d..7d9e12df4d 100755
--- a/t/t5572-pull-submodule.sh
+++ b/t/t5572-pull-submodule.sh
@@ -101,7 +101,12 @@ test_expect_success " --[no-]recurse-submodule and submodule.recurse" '
test_path_is_file super/sub/merge_strategy_4.t
'
-test_expect_success 'recursive rebasing pull' '
+test_expect_success 'pull --rebase --recurse-submodules (remote superproject submodule changes, local submodule changes)' '
+ # This tests the following scenario :
+ # - local submodule has new commits
+ # - local superproject does not have new commits
+ # - upstream superproject has new commits that change the submodule pointer
+
# change upstream
test_commit -C child rebase_strategy &&
git -C parent submodule update --remote &&
@@ -116,7 +121,10 @@ test_expect_success 'recursive rebasing pull' '
test_path_is_file super/sub/local_stuff.t
'
-test_expect_success 'pull rebase recursing fails with conflicts' '
+test_expect_success 'pull --rebase --recurse-submodules fails if both sides record submodule changes' '
+ # This tests the following scenario :
+ # - local superproject has new commits that change the submodule pointer
+ # - upstream superproject has new commits that change the submodule pointer
# local changes in submodule recorded in superproject:
test_commit -C super/sub local_stuff_2 &&