0

I am trying to run:

git rev-list --objects --all 

using 32-bit cygwin, but it is failing with:

fatal: Out of memory, malloc failed (tried to allocated 805523547) bytes.

which corresponds to the size of a large blob that was committed early in the history of the repo.

By using the techniques in:

"Repack of Git repository fails"

I was able to repack a clone of the repo using a 64 bit system and by rsyncing this back to the 32 bit system, I can now fetch the updates from the 64 bit repo into the 32 bit system, however, git rev-list --objects --all still fails on the 32 bit repo.

Are there any options that I can use to prevent git rev-list failing on this repo?

Community
  • 1
  • 1
jonseymour
  • 1,006
  • 1
  • 12
  • 22
  • Maybe related to this? http://superuser.com/questions/537347/how-do-i-pull-big-repos-from-git-on-windows-without-getting-out-of-memory http://stackoverflow.com/questions/10292903/git-on-windows-out-of-memory-malloc-failed – nif Jun 29 '13 at 15:05
  • I had a look at that and tried repacking the source repo with the relevant options, but it didn't help. In the end, I think, the problem is the single large blob (git cat-file blob on that blob also failed) and the only way I am going to fix that permanently is to use filter-branch to remove it and its variants. – jonseymour Jun 30 '13 at 05:30
  • Yep, that worked for me. I did a git filter-branch with an --index-filter on the 64-bit repo on the last commit that had a reference to the big blobs, then added a graft to the 32-bit repo that referenced the rewritten history. With this graft in place, git rev-list --objects now completes without error. – jonseymour Jun 30 '13 at 07:46

0 Answers0