Comment 181 for bug 509180

Revision history for this message
tobyS (tobias-schlitt) wrote :

Issue occurred here yesterday, leaving a Git repo with ~8 not-pushed commits broken. :(

Linux tango 3.0.0-16-generic #28-Ubuntu SMP Fri Jan 27 17:44:39 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

The script for fixing (#41) does not work at all here:

$ git st
fatal: loose object df09705cdd19da7f674558d35c300748b3a2d113 (stored in .git/objects/df/09705cdd19da7f674558d35c300748b3a2d113) is corrupt
$ ./git-remove-trailing-garbage.py df09705cdd19da7f674558d35c300748b3a2d113
error: unable to find df09705cdd19da7f674558d35c300748b3a2d113
fatal: git cat-file df09705cdd19da7f674558d35c300748b3a2d113: bad file
fatal: invalid object type ""
Traceback (most recent call last):
  File "./git-remove-trailing-garbage.py", line 36, in <module>
    with open(obj, 'rb') as f:
IOError: [Errno 5] Input/output error: '/…/.git/objects/df/09705cdd19da7f674558d35c300748b3a2d113'

Any other way to get this fixed?