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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 09, 2021 at 04:58:32PM +0700, Bagas Sanjaya wrote:

> 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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux