]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'ps/read-object-info-improvements' into jch
authorJunio C Hamano <gitster@pobox.com>
Thu, 8 Jan 2026 07:40:37 +0000 (16:40 +0900)
committerJunio C Hamano <gitster@pobox.com>
Thu, 8 Jan 2026 07:40:37 +0000 (16:40 +0900)
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

1  2 
builtin/pack-objects.c
commit-graph.c
odb.h
packfile.c
packfile.h

Simple merge
diff --cc commit-graph.c
Simple merge
diff --cc odb.h
Simple merge
diff --cc packfile.c
index 3ffd6c7240f03d53c75f1e7b3899b25e8104e7d9,39899aec494468f0a593ad67f14b60a897440b14..402c3b5dc731318a8faed0dae320172958191558
@@@ -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,
diff --cc packfile.h
Simple merge