diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-08-14 00:13:39 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-08-14 00:13:39 +0300 |
commit | d1a8a8979d61a889b915dca36aea9c2a88d0f3f7 (patch) | |
tree | 02eece403714ca30f78b50c485e323db0ab44b97 /t | |
parent | 092b6771c799d761a83317f68a467bef930686ad (diff) | |
parent | 9eb86f41de7d229bb3a073e16e735cf71e2ffe3b (diff) |
Merge branch 'jt/has_object'
A new helper function has_object() has been introduced to make it
easier to mark object existence checks that do and don't want to
trigger lazy fetches, and a few such checks are converted using it.
* jt/has_object:
fsck: do not lazy fetch known non-promisor object
pack-objects: no fetch when allow-{any,promisor}
apply: do not lazy fetch when applying binary
sha1-file: introduce no-lazy-fetch has_object()
Diffstat (limited to 't')
-rwxr-xr-x | t/t4150-am.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t4150-am.sh b/t/t4150-am.sh index bda4586a79..94a2c76522 100755 --- a/t/t4150-am.sh +++ b/t/t4150-am.sh @@ -1133,4 +1133,20 @@ test_expect_success 'am and .gitattibutes' ' ) ' +test_expect_success 'apply binary blob in partial clone' ' + printf "\\000" >binary && + git add binary && + git commit -m "binary blob" && + git format-patch --stdout -m HEAD^ >patch && + + test_create_repo server && + test_config -C server uploadpack.allowfilter 1 && + test_config -C server uploadpack.allowanysha1inwant 1 && + git clone --filter=blob:none "file://$(pwd)/server" client && + test_when_finished "rm -rf client" && + + # Exercise to make sure that it works + git -C client am ../patch +' + test_done |