diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-02-27 11:54:13 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-02-27 11:54:13 -0800 |
commit | 5372715ed268b190b022a12579767816ea6738ae (patch) | |
tree | 6384cfe919d87d5ca4b7c5af7fe71b872349f248 /t | |
parent | 3c972e1ec422e0e72ab192ee871656cd065ca80e (diff) | |
parent | 844112cac07d6413b9bb42d38527d2f7ca7c7801 (diff) | |
download | git-5372715ed268b190b022a12579767816ea6738ae.tar.gz |
Merge branch 'db/host-alias'
* db/host-alias:
url rewriting: take longest and first match
Add support for url aliases in config files
Use ALLOC_GROW in remote.{c,h}
Diffstat (limited to 't')
-rwxr-xr-x | t/t5516-fetch-push.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh index 9d2dc33cbd..9023ba05af 100755 --- a/t/t5516-fetch-push.sh +++ b/t/t5516-fetch-push.sh @@ -100,6 +100,23 @@ test_expect_success 'fetch with wildcard' ' ) ' +test_expect_success 'fetch with insteadOf' ' + mk_empty && + ( + TRASH=$(pwd) && + cd testrepo && + git config url./$TRASH/.insteadOf trash/ + git config remote.up.url trash/. && + git config remote.up.fetch "refs/heads/*:refs/remotes/origin/*" && + git fetch up && + + r=$(git show-ref -s --verify refs/remotes/origin/master) && + test "z$r" = "z$the_commit" && + + test 1 = $(git for-each-ref refs/remotes/origin | wc -l) + ) +' + test_expect_success 'push without wildcard' ' mk_empty && @@ -126,6 +143,20 @@ test_expect_success 'push with wildcard' ' ) ' +test_expect_success 'push with insteadOf' ' + mk_empty && + TRASH=$(pwd) && + git config url./$TRASH/.insteadOf trash/ && + git push trash/testrepo refs/heads/master:refs/remotes/origin/master && + ( + cd testrepo && + r=$(git show-ref -s --verify refs/remotes/origin/master) && + test "z$r" = "z$the_commit" && + + test 1 = $(git for-each-ref refs/remotes/origin | wc -l) + ) +' + test_expect_success 'push with matching heads' ' mk_test heads/master && |