summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-01-17 22:49:27 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-01-17 22:49:27 (GMT)
commit3075e40c75560d93b569d1bba715008ca734ad83 (patch)
treed23ecc348dde5dabd0ad8929fc84aab5e9fcd881 /t
parent9da9965ba6672dc0016a5ac694271bbdd4589e15 (diff)
parent0301c821c5cd124733accfbff0ddbf7f0b0ee9fb (diff)
downloadgit-3075e40c75560d93b569d1bba715008ca734ad83.zip
git-3075e40c75560d93b569d1bba715008ca734ad83.tar.gz
git-3075e40c75560d93b569d1bba715008ca734ad83.tar.bz2
Merge branch 'bw/push-dry-run' into maint
"git push --dry-run --recurse-submodule=on-demand" wasn't "--dry-run" in the submodules. * bw/push-dry-run: push: fix --dry-run to not push submodules push: --dry-run updates submodules when --recurse-submodules=on-demand
Diffstat (limited to 't')
-rwxr-xr-xt/t5531-deep-submodule-push.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/t/t5531-deep-submodule-push.sh b/t/t5531-deep-submodule-push.sh
index 198ce84..1524ff5 100755
--- a/t/t5531-deep-submodule-push.sh
+++ b/t/t5531-deep-submodule-push.sh
@@ -427,7 +427,31 @@ test_expect_success 'push unpushable submodule recursively fails' '
cd submodule.git &&
git rev-parse master >../actual
) &&
+ test_when_finished git -C work reset --hard master^ &&
test_cmp expected actual
'
+test_expect_success 'push --dry-run does not recursively update submodules' '
+ (
+ cd work/gar/bage &&
+ git checkout master &&
+ git rev-parse master >../../../expected_submodule &&
+ > junk9 &&
+ git add junk9 &&
+ git commit -m "Ninth junk" &&
+
+ # Go up to 'work' directory
+ cd ../.. &&
+ git checkout master &&
+ git rev-parse master >../expected_pub &&
+ git add gar/bage &&
+ git commit -m "Ninth commit for gar/bage" &&
+ git push --dry-run --recurse-submodules=on-demand ../pub.git master
+ ) &&
+ git -C submodule.git rev-parse master >actual_submodule &&
+ git -C pub.git rev-parse master >actual_pub &&
+ test_cmp expected_pub actual_pub &&
+ test_cmp expected_submodule actual_submodule
+'
+
test_done