]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'tb/midx-avoid-cruft-packs'
authorJunio C Hamano <gitster@pobox.com>
Mon, 21 Jul 2025 16:14:26 +0000 (09:14 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 21 Jul 2025 16:14:26 +0000 (09:14 -0700)
"pack-objects" has been taught to avoid pointing into objects in
cruft packs from midx.

* tb/midx-avoid-cruft-packs:
  repack: exclude cruft pack(s) from the MIDX where possible
  pack-objects: introduce '--stdin-packs=follow'
  pack-objects: swap 'show_{object,commit}_pack_hint'
  pack-objects: fix typo in 'show_object_pack_hint()'
  pack-objects: perform name-hash traversal for unpacked objects
  pack-objects: declare 'rev_info' for '--stdin-packs' earlier
  pack-objects: factor out handling '--stdin-packs'
  pack-objects: limit scope in 'add_object_entry_from_pack()'
  pack-objects: use standard option incompatibility functions

1  2 
builtin/pack-objects.c
builtin/repack.c

index 5781dec9808273a4db0387a3aa758801aee2e249,4ae52c6a29144b9eea1abdabe711ce9347ecceed..067b9e322a9db490f4e4946c000f46a67e87671d
@@@ -4294,9 -4325,10 +4327,10 @@@ static void add_objects_in_unpacked_pac
  }
  
  static int add_loose_object(const struct object_id *oid, const char *path,
-                           void *data UNUSED)
+                           void *data)
  {
 -      enum object_type type = oid_object_info(the_repository, oid, NULL);
+       struct rev_info *revs = data;
 +      enum object_type type = odb_read_object_info(the_repository->objects, oid, NULL);
  
        if (type < 0) {
                warning(_("loose object at %s could not be examined"), path);
Simple merge