summaryrefslogtreecommitdiff
path: root/t/t5516-fetch-push.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-03-25 19:54:25 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-03-25 19:54:25 (GMT)
commit2f6ef7138790d80c43024b132b15ad06daacf266 (patch)
tree3f7c9b2099a4c12051c4c94b6b36587b39433dab /t/t5516-fetch-push.sh
parent927936d75391a81250543c928fed620a2af98464 (diff)
parent32d0462f8da9cc4e26ca1e785098e2ae1bee4d02 (diff)
downloadgit-2f6ef7138790d80c43024b132b15ad06daacf266.zip
git-2f6ef7138790d80c43024b132b15ad06daacf266.tar.gz
git-2f6ef7138790d80c43024b132b15ad06daacf266.tar.bz2
Merge branch 'jk/fetch-pack'
"git fetch" that fetches a commit using the allow-tip-sha1-in-want extension could have failed to fetch all the requested refs. * jk/fetch-pack: fetch-pack: remove dead assignment to ref->new_sha1 fetch_refs_via_pack: free extra copy of refs filter_ref: make a copy of extra "sought" entries filter_ref: avoid overwriting ref->old_sha1 with garbage
Diffstat (limited to 't/t5516-fetch-push.sh')
-rwxr-xr-xt/t5516-fetch-push.sh13
1 files changed, 10 insertions, 3 deletions
diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh
index 630885d..5e04d64 100755
--- a/t/t5516-fetch-push.sh
+++ b/t/t5516-fetch-push.sh
@@ -1107,9 +1107,16 @@ test_expect_success 'fetch exact SHA1' '
git config uploadpack.allowtipsha1inwant true
) &&
- git fetch -v ../testrepo $the_commit:refs/heads/copy &&
- result=$(git rev-parse --verify refs/heads/copy) &&
- test "$the_commit" = "$result"
+ git fetch -v ../testrepo $the_commit:refs/heads/copy master:refs/heads/extra &&
+ cat >expect <<-EOF &&
+ $the_commit
+ $the_first_commit
+ EOF
+ {
+ git rev-parse --verify refs/heads/copy &&
+ git rev-parse --verify refs/heads/extra
+ } >actual &&
+ test_cmp expect actual
)
'