2

I'm getting a warning about suboptimal pack - out of memory when pushing my repo in git:

Counting objects: 103, done.
Delta compression using up to 2 threads.
warning: suboptimal pack - out of memory
Compressing objects: 100% (100/100), done.
...

As you can see, the repo is ultimately compressed, and after this the system pushes the repo successfully. So it appears to be fine, although it is packed suboptimal. My question is: is there any potential damage to the repo, or is it just a bit larger?

This is a fairly large repo so that is what probably causes this error, but as long as my files are not damaged, then I have no problem with this.

  • You should search on Stackoverflow at first: http://stackoverflow.com/questions/4826639/repack-of-git-repository-fails – René Höhle Aug 20 '12 at 11:58
  • Thanks, I did search but could not find information on whether or not the repo is damaged. This thread does not mention that either; it's focused on how to solve it. –  Aug 20 '12 at 12:19

1 Answers1

3

No. Your repository is not damaged. The warning is thrown when git runs out of memory trying to generate a delta index for a particular blob. This alone isn't enough to harm your repository or crash the push process (which is why it was changed from an error to a warning in the first place... more than five years ago):

commit a588d88aaff312f3afd5713ffcb4e4b1829fb5a6
Author: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Date:   Mon May 28 23:20:57 2007 +0200

    builtin-pack-objects: don't fail, if delta is not possible

    If builtin-pack-objects runs out of memory while finding
    the best deltas, it bails out with an error.

    If the delta index creation fails (because there is not enough memory),
    we can downgrade the error message to a warning and continue with the
    next object.

    Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
    Signed-off-by: Junio C Hamano <junkio@cox.net>

Solutions and workarounds are listed in this answer and this answer.

Community
  • 1
  • 1
Christopher
  • 42,720
  • 11
  • 81
  • 99
  • Great, thanks! Currently I'm not too concerned about the size, so I want to leave the repo as-is. I was just worried it might have been damaged. –  Aug 20 '12 at 12:20
  • Note it's the size of the delta in allocated memory, not the files themselves, that causes trouble. It's might be worth poking at the config options in those answers just to eliminate the warning. There should be a performance increase, although it might be tiny. – Christopher Aug 20 '12 at 12:38