From: Junio C Hamano Date: Thu, 8 Jan 2026 07:40:37 +0000 (+0900) Subject: Merge branch 'ps/read-object-info-improvements' into jch X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b43a84d22ef64229819b6ff270a13828dec08409;p=thirdparty%2Fgit.git Merge branch 'ps/read-object-info-improvements' into jch The object-info API has been cleaned up. Comments? * ps/read-object-info-improvements: packfile: drop repository parameter from `packed_object_info()` packfile: skip unpacking object header for disk size requests packfile: disentangle return value of `packed_object_info()` packfile: always populate pack-specific info when reading object info packfile: extend `is_delta` field to allow for "unknown" state packfile: always declare object info to be OI_PACKED object-file: always set OI_LOOSE when reading object info --- b43a84d22ef64229819b6ff270a13828dec08409 diff --cc packfile.c index 3ffd6c7240,39899aec49..402c3b5dc7 --- a/packfile.c +++ b/packfile.c @@@ -2133,9 -2158,9 +2152,9 @@@ int packfile_store_read_object_info(str unsigned flags UNUSED) { struct pack_entry e; - int rtype; + int ret; - if (!find_pack_entry(store->odb->repo, oid, &e)) + if (!find_pack_entry(store, oid, &e)) return 1; /* @@@ -2554,8 -2544,9 +2566,9 @@@ int packfile_store_read_object_stream(s oi.sizep = &size; if (packfile_store_read_object_info(store, oid, &oi, 0) || - oi.u.packed.is_delta || + oi.u.packed.type == PACKED_OBJECT_TYPE_REF_DELTA || + oi.u.packed.type == PACKED_OBJECT_TYPE_OFS_DELTA || - repo_settings_get_big_file_threshold(store->odb->repo) >= size) + repo_settings_get_big_file_threshold(store->source->odb->repo) >= size) return -1; in_pack_type = unpack_object_header(oi.u.packed.pack,