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 9, 2021, 15:49 UTC
Message-ID
<YHB3d31eTACBd6pY@coredump.intra.peff.net>
In-Reply-To
<1edb799b-5e17-264d-e525-5355c52af36a@gmail.com>
On Fri, Apr 09, 2021 at 04:58:32PM +0700, Bagas Sanjaya wrote:
Show 14 quoted lines
> On 08/04/21 05.22, Jeff King wrote:
> > 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.
> > 
> What external tools are for splitting packs? Can splitted packs
> by such tools still be usable by Git?

No, but you can reassemble the parts at the destination before feeding them to Git. On a system with normal posix tools, you can split like:

  git pack-objects --stdout --all </dev/null |
  split -b 1m - split-pack-

and then after transferring split-pack-* (which are individual 1 megabyte files) to the destination, you can do:

  cat split-pack-* |
  git index-pack -v --stdin

(There's no error correction in split; tools like rar will do that, and probably others, but it has been ages since I've had to split a file to meet transfer requirements).

-Peff
Previous: Bagas SanjayaNext: Bryan Turner
Message 8 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.