Re: [PATCH] Prevent megablobs from gunking up git packs
- From
Junio C Hamano <junkio@cox.net>
- Date
- May 23, 2007, 00:28 UTC
- Message-ID
- <7v3b1o758u.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <200705230144.38290.jnareb@gmail.com>
Jakub Narebski <jnareb@gmail.com> writes:
> No, I was thinking about separate _kept_ pack (so it would be not > repacked unless -f option is given) containing _only_ the large blobs. > The only difference between this and your proposal is that megablobs > would be in their mergablobs pack, but not loose.
I am not sure about the "unless -f option is given" part, but a single .kept pack that contains only problematic blobs would be an interesting experiment.
(0) prepare object names of problematic blobs, in huge.txt, one
object name per line;(1) prepare a single pack that has them:
$ N=$(git-pack-object --depth=0 --window=0 pack <huge.txt)
$ echo 'Huge blobs -- do not repack' >pack-$N.keep
$ mv pack-$N.* .git/object/pack/.(2) repack the remainder, with the default depth/window:
$ git repack -a -d
$ git prune