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

Re: There should have be git gc --repack-arguments

From
Jeff King <peff@peff.net>
Date
Apr 7, 2021, 22:22 UTC
Message-ID
<YG4ws7PiKKKjPUff@coredump.intra.peff.net>
In-Reply-To
<xmqqa6q9yc8c.fsf@gitster.g>
On Wed, Apr 07, 2021 at 03:13:39PM -0700, Junio C Hamano wrote:
Show 13 quoted lines
> >> > You can also set pack.packSizeLimit for the latter, though I do not
> >> > recommend it. It will not help with memory usage (neither while
> >> > repacking nor for later commands).
> >> 
> >> In other words, passing --max-pack-size, whether it is done with a
> >> new --repack-arguments option or it is done with the existing
> >> pack.packSizeLimit configuration, would make things worse.
> >
> > Right. I wish we didn't have --max-pack-size at all. I do not think it
> > is ever a good idea, and it complicates the packing code quite a bit.
> 
> I suspect that the original motivation was sneaker-netting on
> multiple floppy disks ;-)

That had always been my impression, too. But when I looked in the archive while writing my earlier reply, most of the discussion near --max-pack-size had to do with the early index limitations.

If you are sneaker-netting, you are probably better off to just split the pack at byte boundaries with an external tool anyway, for two reasons:

  - our max-pack-size is just a guideline. It only splits at object
    boundaries so if you have an object bigger than the max, we'll
    exceed it.
  - dedicated splitting tools often have useful extra features, like
    k-of-n error correction.

Besides, if you are sneaker netting you'd want to use a bundle, and I don't think bundles support max-pack-size. :)

Anyway, all off-topic but an interesting diversion.
-Peff
Previous: Junio C HamanoNext: Bagas Sanjaya
Message 6 of 10 in “There should have be git gc --repack-arguments”
  1. Bagas SanjayaApr 7, 2021
  2. Jeff KingApr 7, 2021
  3. Junio C HamanoApr 7, 2021
  4. Jeff KingApr 7, 2021
  5. Junio C HamanoApr 7, 2021
  6. Jeff KingApr 7, 2021
  7. Bagas SanjayaApr 9, 2021
  8. Jeff KingApr 9, 2021
  9. Bryan TurnerApr 7, 2021
  10. Bagas SanjayaApr 8, 2021

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.