summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2019-12-06 15:09:22 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-12-06 15:09:22 -0800
commit403ac1381cc8bed5e02963a955f2a2a626620eaa (patch)
tree0d6d17741187a8b324e7484be00ff5e65def5f30
parentMerge branch 'hi/grep-do-not-return-void' (diff)
parentsend-pack: use OBJECT_INFO_QUICK to check negative objects (diff)
downloadtgif-403ac1381cc8bed5e02963a955f2a2a626620eaa.tar.xz
Merge branch 'jk/send-pack-check-negative-with-quick'
Performance tweak on "git push" into a repository with many refs that point at objects we have never heard of. * jk/send-pack-check-negative-with-quick: send-pack: use OBJECT_INFO_QUICK to check negative objects
-rw-r--r--send-pack.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/send-pack.c b/send-pack.c
index a7322d3278..0407841ae8 100644
--- a/send-pack.c
+++ b/send-pack.c
@@ -41,7 +41,9 @@ int option_parse_push_signed(const struct option *opt,
static void feed_object(const struct object_id *oid, FILE *fh, int negative)
{
if (negative &&
- !has_object_file_with_flags(oid, OBJECT_INFO_SKIP_FETCH_OBJECT))
+ !has_object_file_with_flags(oid,
+ OBJECT_INFO_SKIP_FETCH_OBJECT |
+ OBJECT_INFO_QUICK))
return;
if (negative)