Re: corrupt object on git-gc
- From
Alex Riesen <raa.lkml@gmail.com>
- Date
- Nov 9, 2007, 08:10 UTC
- Message-ID
- <20071109081035.GA2794@steel.home>
- In-Reply-To
- <6C2C79E72C305246B504CBA17B5500C9029A36A1@mtlexch01.mtl.com>
Yossi Leybovich, Fri, Nov 09, 2007 00:59:47 +0100:
Show 10 quoted lines
> I wonder if someone can help in this error > I tried to do git-gc and got error on corrupted object. > > I do the following: > > $ git-gc > Generating pack... > Done counting 3037 objects. > Deltifying 3037 objects... > error: corrupt loose object '4b9458b3786228369c63936db65827de3cc06200'
It is loose. Nothing uses it in this repository. What do you need to repair it for?
Show 14 quoted lines
> fatal: object 4b9458b3786228369c63936db65827de3cc06200 cannot be read > error: failed to run repack > > sleybo@SLEYBO-LT /w/work/EMC/ib.071030.001/ib > $ cd .git/objects/4b/ > > sleybo@SLEYBO-LT /w/work/EMC/ib.071030.001/ib/.git/objects/4b > $ git-fsck-objects.exe 9458b3786228369c63936db65827de3cc06200 > error: corrupt loose object '4b9458b3786228369c63936db65827de3cc06200' > error: 4b9458b3786228369c63936db65827de3cc06200: object corrupt or > missing > error: invalid parameter: expected sha1, got > '9458b3786228369c63936db65827de3cc06200' > missing blob 4b9458b3786228369c63936db65827de3cc06200
the directories directly under .git/objects contain the first bytes of sha1, to use filesystem in a more efficient way. git-fsck expects an sha1 (or a reference).
Try running moving the corrupt object (with its *whole* name) some place else and run git-fsck --all.