summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2015-03-28 09:33:08 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-03-28 09:33:08 -0700
commit591a1daa7cdfd40ce76d0afcca05a7a648e73f3d (patch)
tree3a7233ef14b8c784526b2b2c497ae1ede1ac1ae7 /t
parentMerge branch 'tg/fix-check-order-with-split-index' into maint (diff)
parentfetch-pack: remove dead assignment to ref->new_sha1 (diff)
downloadtgif-591a1daa7cdfd40ce76d0afcca05a7a648e73f3d.tar.xz
Merge branch 'jk/fetch-pack' into maint
"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')
-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 594d7a6998..050877f181 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
)
'