From: Junio C Hamano Date: Mon, 6 Apr 2026 22:42:49 +0000 (-0700) Subject: Merge branch 'tb/stdin-packs-excluded-but-open' X-Git-Tag: v2.54.0-rc1~21 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=03311dca7f91f69e9e0c532fce1c1e3c0a9fa34d;p=thirdparty%2Fgit.git Merge branch 'tb/stdin-packs-excluded-but-open' pack-objects's --stdin-packs=follow mode learns to handle excluded-but-open packs. * tb/stdin-packs-excluded-but-open: repack: mark non-MIDX packs above the split as excluded-open pack-objects: support excluded-open packs with --stdin-packs t7704: demonstrate failure with once-cruft objects above the geometric split pack-objects: refactor `read_packs_list_from_stdin()` to use `strmap` pack-objects: plug leak in `read_stdin_packs()` --- 03311dca7f91f69e9e0c532fce1c1e3c0a9fa34d diff --cc packfile.h index 45b35973f0,b7735c1977..6e8802e2ed --- a/packfile.h +++ b/packfile.h @@@ -266,18 -267,9 +267,19 @@@ int packfile_store_freshen_object(struc enum kept_pack_type { KEPT_PACK_ON_DISK = (1 << 0), KEPT_PACK_IN_CORE = (1 << 1), + KEPT_PACK_IN_CORE_OPEN = (1 << 2), }; +/* + * Count the number objects contained in the given packfile store. If + * successful, the number of objects will be written to the `out` pointer. + * + * Return 0 on success, a negative error code otherwise. + */ +int packfile_store_count_objects(struct packfile_store *store, + enum odb_count_objects_flags flags, + unsigned long *out); + /* * Retrieve the cache of kept packs from the given packfile store. Accepts a * combination of `kept_pack_type` flags. The cache is computed on demand and