From: Patrick Steinhardt Date: Tue, 07 Oct 2025 12:41:06 GMT Subject: [PATCH 0/6] packfile: remove `packfile_store_get_packs()` Message-ID: <20251007-pks-packfiles-convert-get-all-v1-0-428227657a89@pks.im> Hi, this patch series follows up on the discussion at [1]. Originally, these patches were part of the series that introduced the packfile store, but we decided to split them out into a separate series. In any case, the goal of this series is to remove the confusing difference between `packfiles_store_get_{,all_}packs()`. It's not really obvious to the caller what the difference is. But even worse, the result of these functions depends on whether or not `get_all_packs()` was ever executed before `get_packs()`. The series is built on top of 821f583da6 (The thirteenth batcn, 2025-09-29) with tb/incremental-midx-part-3.1 at c886af90f8 (SQUASH??? play well with other topics by preemptively including "repository.h", 2025-09-29) merged into it. This is done to fix some minor conflicts with that patch series. Thanks! Patrick [1]: --- Patrick Steinhardt (6): object-name: convert to use `packfile_store_get_all_packs()` builtin/gc: convert to use `packfile_store_get_all_packs()` builtin/grep: simplify how we preload packs packfile: drop `packfile_store_get_packs()` packfile: introduce macro to iterate through packs packfile: rename `packfile_store_get_all_packs()` builtin/cat-file.c | 2 +- builtin/count-objects.c | 2 +- builtin/fast-import.c | 4 ++-- builtin/fsck.c | 12 ++++++------ builtin/gc.c | 14 +++++++------- builtin/grep.c | 2 +- builtin/pack-objects.c | 18 +++++++++--------- builtin/pack-redundant.c | 12 ++++-------- connected.c | 2 +- http-backend.c | 4 ++-- http.c | 2 +- object-name.c | 8 +++++--- pack-bitmap.c | 6 +++--- pack-objects.c | 4 ++-- packfile.c | 10 ++-------- packfile.h | 8 ++++---- repack-cruft.c | 2 +- repack-geometry.c | 2 +- repack.c | 2 +- server-info.c | 2 +- t/helper/test-find-pack.c | 3 ++- t/helper/test-pack-mtimes.c | 2 +- 22 files changed, 58 insertions(+), 65 deletions(-) --- base-commit: a0cb7ee3bf6c8398ab18e7b0dfabec106312b2f8 change-id: 20250926-pks-packfiles-convert-get-all-4236f6e2ed9b