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

Re: Large pack causes git clone failures ... what to do?

From
Geoff Russell <geoffrey.russell@gmail.com>
Date
Sep 1, 2010, 03:02 UTC
Message-ID
<AANLkTikvkuCjm2+EmGLkWkucZrqxMH8vL9TBymfRk=0e@mail.gmail.com>
In-Reply-To
<AANLkTik2Ms6qjQAaa_H8GGwmTG1fsk+8GR2y7ZmLviY-@mail.gmail.com>

On Wed, Sep 1, 2010 at 11:23 AM, Geoff Russell <geoffrey.russell@gmail.com> wrote:

Show 17 quoted lines
> On Wed, Sep 1, 2010 at 7:33 AM, Geoff Russell
> <geoffrey.russell@gmail.com> wrote:
>> Thanks Shawn,
>>
>>...
>>> 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.

Previous: Geoff RussellNext: Shawn O. Pearce
Message 5 of 7 in “Large pack causes git clone failures ... what to do?”
  1. Geoff RussellAug 31, 2010
  2. Shawn O. PearceAug 31, 2010
  3. Geoff RussellAug 31, 2010
  4. Geoff RussellSep 1, 2010
  5. Geoff RussellSep 1, 2010
  6. Shawn O. PearceSep 1, 2010
  7. Geoff RussellSep 6, 2010

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.