diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-03-25 12:54:25 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-03-25 12:54:25 -0700 |
commit | 2f6ef7138790d80c43024b132b15ad06daacf266 (patch) | |
tree | 3f7c9b2099a4c12051c4c94b6b36587b39433dab /t | |
parent | Merge branch 'jk/cleanup-failed-clone' (diff) | |
parent | fetch-pack: remove dead assignment to ref->new_sha1 (diff) | |
download | tgif-2f6ef7138790d80c43024b132b15ad06daacf266.tar.xz |
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')
-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 630885d6df..5e04d64109 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 ) ' |