diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-03-28 09:33:08 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-03-28 09:33:08 -0700 |
commit | 591a1daa7cdfd40ce76d0afcca05a7a648e73f3d (patch) | |
tree | 3a7233ef14b8c784526b2b2c497ae1ede1ac1ae7 /t | |
parent | Merge branch 'tg/fix-check-order-with-split-index' into maint (diff) | |
parent | fetch-pack: remove dead assignment to ref->new_sha1 (diff) | |
download | tgif-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-x | t/t5516-fetch-push.sh | 13 |
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 ) ' |