Merge branch 'sb/t5531-update-desc' into maint
authorJunio C Hamano <gitster@pobox.com>
Mon, 5 Jun 2017 00:03:21 +0000 (09:03 +0900)
committerJunio C Hamano <gitster@pobox.com>
Mon, 5 Jun 2017 00:03:21 +0000 (09:03 +0900)
The description strings for a few tests have been updated.

* sb/t5531-update-desc:
t5531: fix test description

1  2 
t/t5531-deep-submodule-push.sh
index 57ba3226288cadbbe8af569d13217f5b2c17af90,62160ab0ca680b111a03fa6e8c2abb98cb9da618..23c533e82e71e3b6ed26fc69313c4b51c36c3faa
@@@ -1,6 -1,6 +1,6 @@@
  #!/bin/sh
  
- test_description='unpack-objects'
+ test_description='test push with submodules'
  
  . ./test-lib.sh
  
@@@ -27,7 -27,7 +27,7 @@@ test_expect_success setup 
        )
  '
  
- test_expect_success push '
+ test_expect_success 'push works with recorded gitlink' '
        (
                cd work &&
                git push ../pub.git master
@@@ -475,56 -475,4 +475,56 @@@ test_expect_success 'push only unpushe
        test_cmp expected_pub actual_pub
  '
  
 +test_expect_success 'push propagating the remotes name to a submodule' '
 +      git -C work remote add origin ../pub.git &&
 +      git -C work remote add pub ../pub.git &&
 +
 +      > work/gar/bage/junk10 &&
 +      git -C work/gar/bage add junk10 &&
 +      git -C work/gar/bage commit -m "Tenth junk" &&
 +      git -C work add gar/bage &&
 +      git -C work commit -m "Tenth junk added to gar/bage" &&
 +
 +      # Fails when submodule does not have a matching remote
 +      test_must_fail git -C work push --recurse-submodules=on-demand pub master &&
 +      # Succeeds when submodules has matching remote and refspec
 +      git -C work push --recurse-submodules=on-demand origin master &&
 +
 +      git -C submodule.git rev-parse master >actual_submodule &&
 +      git -C pub.git rev-parse master >actual_pub &&
 +      git -C work/gar/bage rev-parse master >expected_submodule &&
 +      git -C work rev-parse master >expected_pub &&
 +      test_cmp expected_submodule actual_submodule &&
 +      test_cmp expected_pub actual_pub
 +'
 +
 +test_expect_success 'push propagating refspec to a submodule' '
 +      > work/gar/bage/junk11 &&
 +      git -C work/gar/bage add junk11 &&
 +      git -C work/gar/bage commit -m "Eleventh junk" &&
 +
 +      git -C work checkout branch2 &&
 +      git -C work add gar/bage &&
 +      git -C work commit -m "updating gar/bage in branch2" &&
 +
 +      # Fails when submodule does not have a matching branch
 +      test_must_fail git -C work push --recurse-submodules=on-demand origin branch2 &&
 +      # Fails when refspec includes an object id
 +      test_must_fail git -C work push --recurse-submodules=on-demand origin \
 +              "$(git -C work rev-parse branch2):refs/heads/branch2" &&
 +      # Fails when refspec includes 'HEAD' as it is unsupported at this time
 +      test_must_fail git -C work push --recurse-submodules=on-demand origin \
 +              HEAD:refs/heads/branch2 &&
 +
 +      git -C work/gar/bage branch branch2 master &&
 +      git -C work push --recurse-submodules=on-demand origin branch2 &&
 +
 +      git -C submodule.git rev-parse branch2 >actual_submodule &&
 +      git -C pub.git rev-parse branch2 >actual_pub &&
 +      git -C work/gar/bage rev-parse branch2 >expected_submodule &&
 +      git -C work rev-parse branch2 >expected_pub &&
 +      test_cmp expected_submodule actual_submodule &&
 +      test_cmp expected_pub actual_pub
 +'
 +
  test_done