summaryrefslogtreecommitdiff
path: root/t/t5510-fetch.sh
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2013-10-23 15:50:35 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-10-24 20:27:45 (GMT)
commitd0d06e892a1a7bc6a1dfd76374da09f0170cae2c (patch)
treee487dc3fe685d0852e712ef8c8805339442109a1 /t/t5510-fetch.sh
parent2004658b19bf781d446e14e3237f519e80ab0297 (diff)
downloadgit-d0d06e892a1a7bc6a1dfd76374da09f0170cae2c.zip
git-d0d06e892a1a7bc6a1dfd76374da09f0170cae2c.tar.gz
git-d0d06e892a1a7bc6a1dfd76374da09f0170cae2c.tar.bz2
t5510: prepare test refs more straightforwardly
"git fetch" was being used with contrived refspecs to create tags and remote-tracking branches in test repositories in preparation for the actual tests. This is obscure and also makes one wonder whether this is indeed just preparation or whether some side-effect of "git fetch" is being tested. So use the more straightforward commands "git tag" / "git update-ref" when preparing branches in test repositories. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5510-fetch.sh')
-rwxr-xr-xt/t5510-fetch.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index c5e5dfc..08d8dbb 100755
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
@@ -88,7 +88,7 @@ test_expect_success 'fetch --prune on its own works as expected' '
cd "$D" &&
git clone . prune &&
cd prune &&
- git fetch origin refs/heads/master:refs/remotes/origin/extrabranch &&
+ git update-ref refs/remotes/origin/extrabranch master &&
git fetch --prune origin &&
test_must_fail git rev-parse origin/extrabranch
@@ -98,7 +98,7 @@ test_expect_success 'fetch --prune with a branch name keeps branches' '
cd "$D" &&
git clone . prune-branch &&
cd prune-branch &&
- git fetch origin refs/heads/master:refs/remotes/origin/extrabranch &&
+ git update-ref refs/remotes/origin/extrabranch master &&
git fetch --prune origin master &&
git rev-parse origin/extrabranch
@@ -117,7 +117,7 @@ test_expect_success 'fetch --prune --tags does not delete the remote-tracking br
cd "$D" &&
git clone . prune-tags &&
cd prune-tags &&
- git fetch origin refs/heads/master:refs/tags/sometag &&
+ git tag sometag master &&
git fetch --prune --tags origin &&
git rev-parse origin/master &&
@@ -128,7 +128,7 @@ test_expect_success 'fetch --prune --tags with branch does not delete other remo
cd "$D" &&
git clone . prune-tags-branch &&
cd prune-tags-branch &&
- git fetch origin refs/heads/master:refs/remotes/origin/extrabranch &&
+ git update-ref refs/remotes/origin/extrabranch master &&
git fetch --prune --tags origin master &&
git rev-parse origin/extrabranch