git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/6] packfile: remove `packfile_store_get_packs()`

From
Patrick Steinhardt <ps@pks.im>
Date
Oct 7, 2025, 12:41 UTC
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]: <aK5hpwcCgjkgQB1N@nand.local>
---
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

Next: Patrick Steinhardt
Message 1 of 27 in “packfile: remove `packfile_store_get_packs()`”
  1. 0/6 packfile: remove `packfile_store_get_packs()`Patrick Steinhardt, Oct 7, 2025
  2. 1/6 object-name: convert to use `packfile_store_get_all_packs()`Patrick Steinhardt, Oct 7, 2025
  3. Taylor BlauOct 8, 2025
  4. 2/6 builtin/gc: convert to use `packfile_store_get_all_packs()`Patrick Steinhardt, Oct 7, 2025
  5. Taylor BlauOct 8, 2025
  6. Patrick SteinhardtOct 9, 2025
  7. 3/6 builtin/grep: simplify how we preload packsPatrick Steinhardt, Oct 7, 2025
  8. Taylor BlauOct 8, 2025
  9. 4/6 packfile: drop `packfile_store_get_packs()`Patrick Steinhardt, Oct 7, 2025
  10. Taylor BlauOct 8, 2025
  11. 5/6 packfile: introduce macro to iterate through packsPatrick Steinhardt, Oct 7, 2025
  12. Taylor BlauOct 8, 2025
  13. Patrick SteinhardtOct 9, 2025
  14. 6/6 packfile: rename `packfile_store_get_all_packs()`Patrick Steinhardt, Oct 7, 2025
  15. Taylor BlauOct 8, 2025
  16. Patrick SteinhardtOct 9, 2025
  17. 0/6 packfile: remove `packfile_store_get_packs()`Patrick Steinhardt, Oct 9, 2025
  18. 1/6 object-name: convert to use `packfile_store_get_all_packs()`Patrick Steinhardt, Oct 9, 2025
  19. Justin ToblerOct 14, 2025
  20. 2/6 builtin/gc: convert to use `packfile_store_get_all_packs()`Patrick Steinhardt, Oct 9, 2025
  21. 3/6 builtin/grep: simplify how we preload packsPatrick Steinhardt, Oct 9, 2025
  22. 4/6 packfile: drop `packfile_store_get_packs()`Patrick Steinhardt, Oct 9, 2025
  23. Justin ToblerOct 14, 2025
  24. 5/6 packfile: introduce macro to iterate through packsPatrick Steinhardt, Oct 9, 2025
  25. Justin ToblerOct 14, 2025
  26. 6/6 packfile: rename `packfile_store_get_all_packs()`Patrick Steinhardt, Oct 9, 2025
  27. Justin ToblerOct 14, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.