Code

t5516: Check pushurl config setting
authorMichael J Gruber <git@drmicha.warpmail.net>
Tue, 9 Jun 2009 16:01:35 +0000 (18:01 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 10 Jun 2009 06:46:47 +0000 (23:46 -0700)
Check whether the new remote.${remotename}.pushurl setting is obeyed
and whether it overrides remote.${remotename}.url.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5516-fetch-push.sh

index 89649e7a9b2dc138bb9618d4e5770e76f62dc7e0..2d2633f3f8784565faf5db84c6efe12d9c405013 100755 (executable)
@@ -419,6 +419,19 @@ test_expect_success 'push with config remote.*.push = HEAD' '
 git config --remove-section remote.there
 git config --remove-section branch.master
 
+test_expect_success 'push with config remote.*.pushurl' '
+
+       mk_test heads/master &&
+       git checkout master &&
+       git config remote.there.url test2repo &&
+       git config remote.there.pushurl testrepo &&
+       git push there &&
+       check_push_result $the_commit heads/master
+'
+
+# clean up the cruft left with the previous one
+git config --remove-section remote.there
+
 test_expect_success 'push with dry-run' '
 
        mk_test heads/master &&