Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Tan <jonathantanmy@google.com>2020-08-06 02:06:50 +0300
committerJunio C Hamano <gitster@pobox.com>2020-08-06 23:01:02 +0300
commit3318238db9498749db6d4feb7a804d366eccfa82 (patch)
tree0e7cd4c057fa2365698296f7ef8f1fe02222b75c /t/t4150-am.sh
parent1d8d9cb62099e1524ce1269ea88faad871c2197f (diff)
apply: do not lazy fetch when applying binary
When applying a binary patch, as an optimization, "apply" checks if the postimage is already present. During this fetch, it is perfectly expected for the postimage not to be present, so there is no need to lazy-fetch missing objects. Teach "apply" not to lazy-fetch in this case. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4150-am.sh')
-rwxr-xr-xt/t4150-am.sh16
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