aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-01-31 13:14:56 -0800
committerJunio C Hamano <gitster@pobox.com>2017-01-31 13:14:56 -0800
commit792e22e3fd99f204be11b0ff173f2d991308dca5 (patch)
tree9838bb4c36ef4e1872772c39b5ac4484419de54b /t
parentdaf75f2e6bb9f2f723eb0532c08dd6002fb17190 (diff)
parent225e8bf778d21104da10cfb316e0e2898b24e809 (diff)
downloadgit-792e22e3fd99f204be11b0ff173f2d991308dca5.tar.gz
git-792e22e3fd99f204be11b0ff173f2d991308dca5.tar.xz
Merge branch 'bw/push-submodule-only'
"git submodule push" learned "--recurse-submodules=only option to push submodules out without pushing the top-level superproject. * bw/push-submodule-only: push: add option to push only submodules submodules: add RECURSE_SUBMODULES_ONLY value transport: reformat flag #defines to be more readable
Diffstat (limited to 't')
-rwxr-xr-xt/t5531-deep-submodule-push.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/t/t5531-deep-submodule-push.sh b/t/t5531-deep-submodule-push.sh
index 1524ff5ba..f55137f76 100755
--- a/t/t5531-deep-submodule-push.sh
+++ b/t/t5531-deep-submodule-push.sh
@@ -454,4 +454,25 @@ test_expect_success 'push --dry-run does not recursively update submodules' '
test_cmp expected_submodule actual_submodule
'
+test_expect_success 'push --dry-run does not recursively update submodules' '
+ git -C work push --dry-run --recurse-submodules=only ../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_expect_success 'push only unpushed submodules recursively' '
+ git -C work/gar/bage rev-parse master >expected_submodule &&
+ git -C pub.git rev-parse master >expected_pub &&
+
+ git -C work push --recurse-submodules=only ../pub.git master &&
+
+ git -C submodule.git rev-parse master >actual_submodule &&
+ git -C pub.git rev-parse master >actual_pub &&
+ test_cmp expected_submodule actual_submodule &&
+ test_cmp expected_pub actual_pub
+'
+
test_done