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

[PATCH 0/2] repack: make `collect_pack_filenames()` consistent

From
Taylor Blau <me@ttaylorr.com>
Date
Jul 10, 2023, 19:37 UTC
Message-ID
<cover.1689017830.git.me@ttaylorr.com>

This series combines a patch that Stolee wrote[1] as an RFC, along with one that I added as a follow-up on top[2].

The details are spelled out in the commit messages, but the gist is that the first patch restores behavior from prior to 73320e49ad (builtin/repack.c: only collect fully-formed packs, 2023-06-07).

The second patch does not change any behavior, but reimplements `collect_pack_filenames()` in terms of `get_all_packs()`, to make `git repack`'s notion of which packs exist in a usable state in the repository is consistent with `add_packed_git()`, `install_packed_git()`, etc.

[1]: https://lore.kernel.org/git/pull.1546.git.1687287782439.gitgitgadget@gmail.com/ [2]: https://lore.kernel.org/git/ZJ1N2I6sDfxhrJo8@nand.local/

Derrick Stolee (1):
  builtin/repack.c: only repack `.pack`s that exist
Taylor Blau (1):
  builtin/repack.c: avoid dir traversal in `collect_pack_filenames()`
 builtin/repack.c  | 38 +++++++++++++++-----------------------
 t/t7700-repack.sh | 47 ++++++++++++++++++++++++++++++++++++++++++-----
 2 files changed, 57 insertions(+), 28 deletions(-)
-- 
2.41.0.320.gb3d0d9308ef
Next: Taylor Blau
Message 1 of 10 in “repack: make `collect_pack_filenames()` consistent”
  1. 0/2 repack: make `collect_pack_filenames()` consistentTaylor Blau, Jul 10, 2023
  2. 1/2 builtin/repack.c: only repack `.pack`s that existTaylor Blau, Jul 10, 2023
  3. Junio C HamanoJul 10, 2023
  4. Taylor BlauJul 11, 2023
  5. 2/2 builtin/repack.c: avoid dir traversal in `collect_pack_filenames()`Taylor Blau, Jul 10, 2023
  6. Junio C HamanoJul 10, 2023
  7. Taylor BlauJul 11, 2023
  8. 0/2 repack: make `collect_pack_filenames()` consistentTaylor Blau, Jul 11, 2023
  9. 1/2 builtin/repack.c: only repack `.pack`s that existTaylor Blau, Jul 11, 2023
  10. 2/2 builtin/repack.c: avoid dir traversal in `collect_pack_filenames()`Taylor Blau, Jul 11, 2023

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.