diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-03-28 08:39:39 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-03-28 13:53:27 -0700 |
commit | c68c408a7a53736ae087a68ad0ce2cf7c4cab0a2 (patch) | |
tree | 2918f9bf2611a91b62036d7834bc2e14c8ef82eb | |
parent | 9a82efd0d2a2727507bd908d7f0545437fcc0ff6 (diff) | |
download | git-c68c408a7a53736ae087a68ad0ce2cf7c4cab0a2.tar.gz git-c68c408a7a53736ae087a68ad0ce2cf7c4cab0a2.tar.xz |
t5516: test interaction between pushURL and pushInsteadOf correctly
1c2eafb89bca (Add url.<base>.pushInsteadOf: URL rewriting for push
only, 2009-09-07) wants to make sure that a push destination read
from URL is not rewritten by pushInsteadOf because an explicit
pushURL exists; for that, a pushInsteadOf rewrite rule for the value
of remote.r.URL is set to a non-existent is set up.
We would also want to make sure that pushInsteadOf rewrite rule is
not applied to the location read from pushURL.
This way, we will make sure that
- "testrepo/" (pushURL) gets updated;
- the push does not try to update "trash2/" (the result of applying
pushInsteadOf to pushURL);
- the push does not try to update "trash3/" (the result of applying
pushInsteadOf to URL).
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-x | t/t5516-fetch-push.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh index c31e5c1c5..9a21cd61d 100755 --- a/t/t5516-fetch-push.sh +++ b/t/t5516-fetch-push.sh @@ -230,10 +230,10 @@ test_expect_success 'push with pushInsteadOf' ' test_expect_success 'push with pushInsteadOf and explicit pushurl (pushInsteadOf should not rewrite)' ' mk_empty && - TRASH="$(pwd)/" && - git config "url.trash2/.pushInsteadOf" trash/ && + git config "url.trash2/.pushInsteadOf" testrepo/ && + git config "url.trash3/.pusnInsteadOf" trash/wrong && git config remote.r.url trash/wrong && - git config remote.r.pushurl "$TRASH/testrepo" && + git config remote.r.pushurl "testrepo/" && git push r refs/heads/master:refs/remotes/origin/master && ( cd testrepo && |