aboutsummaryrefslogtreecommitdiff
path: root/packfile.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-12-30 12:58:21 +0900
committerJunio C Hamano <gitster@pobox.com>2025-12-30 12:58:22 +0900
commite7b1925381123cea4a8817054f7d41bc6568de86 (patch)
treec9eb93fa6f1cece490d01a4e6ba8713be93b437c /packfile.c
parenta194cdc8f3c8d74a22c6342a915b1f7587277152 (diff)
parenta650ad996db85b64643970dd7dc5920f989260a0 (diff)
downloadgit-e7b1925381123cea4a8817054f7d41bc6568de86.tar.xz
Merge branch 'jc/object-read-stream-fix'
Fix a performance regression in recently graduated topic. * jc/object-read-stream-fix: odb: do not use "blank" substitute for NULL
Diffstat (limited to 'packfile.c')
-rw-r--r--packfile.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/packfile.c b/packfile.c
index c7438c5b09..23a7f8a191 100644
--- a/packfile.c
+++ b/packfile.c
@@ -2138,7 +2138,6 @@ int packfile_store_read_object_info(struct packfile_store *store,
struct object_info *oi,
unsigned flags UNUSED)
{
- static struct object_info blank_oi = OBJECT_INFO_INIT;
struct pack_entry e;
int rtype;
@@ -2149,7 +2148,7 @@ int packfile_store_read_object_info(struct packfile_store *store,
* We know that the caller doesn't actually need the
* information below, so return early.
*/
- if (oi == &blank_oi)
+ if (!oi)
return 0;
rtype = packed_object_info(store->odb->repo, e.p, e.offset, oi);