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

Re: [PATCH 11/11] midx-write.c: use `--stdin-packs` when repacking

From
Jeff King <peff@peff.net>
Date
Mar 27, 2024, 08:37 UTC
Message-ID
<20240327083725.GC830163@coredump.intra.peff.net>
In-Reply-To
<736be63234baf7fc6df8259d9bb7298858b2bc74.1711387439.git.me@ttaylorr.com>
On Mon, Mar 25, 2024 at 01:24:50PM -0400, Taylor Blau wrote:
Show 14 quoted lines
> Though correct, this typically yields a poorly structured pack, since
> providing the objects list over stdin does not give pack-objects a
> chance to discover the namehash values for each object, leading to
> sub-optimal delta selection.
> 
> We can use `--stdin-packs` instead, which has a couple of benefits:
> 
>   - it does a supplemental walk over objects in the supplied list of
>     packs to discover their namehash, leading to higher-quality delta
>     selection
> 
>   - it requires us to list far less data over stdin; instead of listing
>     each object in the resulting pack, we need only list the
>     constituent packs from which those objects were selected in the MIDX

Yeah, using --stdin-packs makes much more sense to me. I have to admit that I do not really see the point "multi-pack-index repack" in the first place. You'd presumably be better off with geometric repacking, and I think "repack --geometric --write-midx" will do things in the right order (new pack, then write midx, then delete redundant packs).

I guess "multi-pack-index repack" came before geometric repacking, and is maybe redundant-ish now? If that's the case, then I guess I don't care that much about optimizing its packs. ;) But we can't really delete it without a deprecation period, so making it more sensible in the meantime is reasonable to me.

-Peff
Previous: Taylor BlauNext: Jeff King
Message 21 of 30 in “midx: split MIDX writing routines into midx-write.c, cleanup”
  1. 00/11 midx: split MIDX writing routines into midx-write.c, cleanupTaylor Blau, Mar 25, 2024
  2. 01/11 midx-write: initial commitTaylor Blau, Mar 25, 2024
  3. Junio C HamanoMar 25, 2024
  4. Taylor BlauMar 25, 2024
  5. 02/11 midx: extern a pair of shared functionsTaylor Blau, Mar 25, 2024
  6. 03/11 midx: move `midx_repack` (and related functions) to midx-write.cTaylor Blau, Mar 25, 2024
  7. 04/11 midx: move `expire_midx_packs` to midx-write.cTaylor Blau, Mar 25, 2024
  8. 05/11 midx: move `write_midx_file_only` to midx-write.cTaylor Blau, Mar 25, 2024
  9. 06/11 midx: move `write_midx_file` to midx-write.cTaylor Blau, Mar 25, 2024
  10. 07/11 midx: move `write_midx_internal` (and related functions) to midx-write.cTaylor Blau, Mar 25, 2024
  11. 08/11 midx-write.c: avoid directly managed temporary strbufTaylor Blau, Mar 25, 2024
  12. Junio C HamanoMar 25, 2024
  13. Taylor BlauMar 25, 2024
  14. 09/11 midx-write.c: factor out common want_included_pack() routineTaylor Blau, Mar 25, 2024
  15. Junio C HamanoMar 25, 2024
  16. Jeff KingMar 27, 2024
  17. 10/11 midx-write.c: check count of packs to repack after groupingTaylor Blau, Mar 25, 2024
  18. Junio C HamanoMar 25, 2024
  19. Taylor BlauMar 25, 2024
  20. 11/11 midx-write.c: use `--stdin-packs` when repackingTaylor Blau, Mar 25, 2024
  21. Jeff KingMar 27, 2024
  22. Jeff KingMar 27, 2024
  23. 0/4 midx: split MIDX writing routines into midx-write.c, cleanupTaylor Blau, Apr 1, 2024
  24. 1/4 midx-write: move writing-related functions from midx.cTaylor Blau, Apr 1, 2024
  25. 2/4 midx-write.c: factor out common want_included_pack() routineTaylor Blau, Apr 1, 2024
  26. Patrick SteinhardtApr 2, 2024
  27. 3/4 midx-write.c: check count of packs to repack after groupingTaylor Blau, Apr 1, 2024
  28. 4/4 midx-write.c: use `--stdin-packs` when repackingTaylor Blau, Apr 1, 2024
  29. Junio C HamanoApr 1, 2024
  30. Patrick SteinhardtApr 2, 2024

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.