Re: Large pack causes git clone failures ... what to do?
From: Geoff Russell <hidden>
Date: 2016-06-15 22:49:27
On Wed, Sep 1, 2010 at 11:23 AM, Geoff Russell [off-list ref] wrote:
On Wed, Sep 1, 2010 at 7:33 AM, Geoff Russell [off-list ref] wrote:quoted
Thanks Shawn, ...quoted
You really needed to run: git repack --max-pack-size=.. -a -d The -d flag tells it to remove the old packs once the new packs are ready, and the -a flag tells it to reconsider every object in the repository, rather than just those that are loose.Ok, will try.The repack failed with a "fatal: Out of memory, malloc failed", perhaps I just need to try a machine with more memory!
Ok, I rsynced the directory to a machine with 12Gb of memory and ran the repack (git version 1.7.2.2) the repack worked (and quickly) but left a "bad" sha1 file behind: $ git repack --max-pack-size=100M -a -d Counting objects: 517563, done. Delta compression using up to 8 threads. Compressing objects: 100% (154217/154217), done. Writing objects: 100% (517563/517563), done. Total 517563 (delta 353081), reused 465715 (delta 335261) Removing duplicate objects: 100% (256/256), done. $ git fsck bad sha1 file: ./objects/5b/.fd25f132c21493b661978fc9362f673ea6e58b.cwxzjT dangling commit c7a4ecaa1732869f9bfa21d948cb8714fd303713 I removed the bad file on the presumption that it was a working file and reran the fsck and all looked okay. Cheers, Geoff.