* missing object on git-gc
[not found] <6C2C79E72C305246B504CBA17B5500C902535D9C@mtlexch01.mtl.com>
@ 2007-11-08 0:59 ` Yossi Leybovich
2007-11-08 5:03 ` Christian Couder
[not found] ` <458BC6B0F287034F92FE78908BD01CE814472B3D@mtlexch01.mtl.com>
1 sibling, 1 reply; 10+ messages in thread
From: Yossi Leybovich @ 2007-11-08 0:59 UTC (permalink / raw)
To: git
I am running the git-gc tool over my repository and get the following error:
> git-gc
...
deltifying 3308 objects...
error: corrupt loose object '<sha1>'
fatal: object <sha1> cannot be read .
error: failed to run repack
when sha1 is 40 bytes number
Does any one know how I can solve thus issue?
Thanks
YOssi
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: missing object on git-gc
2007-11-08 0:59 ` missing object on git-gc Yossi Leybovich
@ 2007-11-08 5:03 ` Christian Couder
0 siblings, 0 replies; 10+ messages in thread
From: Christian Couder @ 2007-11-08 5:03 UTC (permalink / raw)
To: Yossi Leybovich; +Cc: git
There is an entry "How to fix a broken repository?" in the Git Faq on the
wiki:
http://git.or.cz/gitwiki/GitFaq#head-ac11406480d09e2df98588e800e41b7256602074
Maybe it can help you.
The same topic has been discussed at least 3 times on the mailing list.
By the way, if you find these discussions on gmane, please tell us so that
we can add the links to the FAQ entry. (You can also add them yourself.)
Thanks,
Christian.
Le jeudi 8 novembre 2007, Yossi Leybovich a écrit :
> I am running the git-gc tool over my repository and get the following
> error:
>
> > git-gc
>
> ...
> deltifying 3308 objects...
> error: corrupt loose object '<sha1>'
> fatal: object <sha1> cannot be read .
> error: failed to run repack
>
> when sha1 is 40 bytes number
>
> Does any one know how I can solve thus issue?
>
> Thanks
> YOssi
> -
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* corrupt object on git-gc
[not found] ` <458BC6B0F287034F92FE78908BD01CE814472B3D@mtlexch01.mtl.com>
@ 2007-11-08 23:59 ` Yossi Leybovich
2007-11-09 5:13 ` Christian Couder
2007-11-09 8:10 ` Alex Riesen
0 siblings, 2 replies; 10+ messages in thread
From: Yossi Leybovich @ 2007-11-08 23:59 UTC (permalink / raw)
To: git
[-- Attachment #1: Type: text/plain, Size: 1139 bytes --]
Hi
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'
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
'9458b3786228369c63936db65827de3cc0
6200'
missing blob 4b9458b3786228369c63936db65827de3cc06200
Unfortunately I can't get this object from backup directories as advise
in the FAQ.
Can this object manually fixed by any tool? (the object is attached) I
don't even know to which file/tree/commit it belong how can I know that
?
Thanks
Yossi
[-- Attachment #2: 9458b3786228369c63936db65827de3cc06200 --]
[-- Type: application/octet-stream, Size: 7661 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: corrupt object on git-gc
2007-11-08 23:59 ` corrupt " Yossi Leybovich
@ 2007-11-09 5:13 ` Christian Couder
2007-11-09 12:16 ` Yossi Leybovich
2007-11-09 8:10 ` Alex Riesen
1 sibling, 1 reply; 10+ messages in thread
From: Christian Couder @ 2007-11-09 5:13 UTC (permalink / raw)
To: Yossi Leybovich; +Cc: git
Le vendredi 9 novembre 2007, Yossi Leybovich a écrit :
>
> Unfortunately I can't get this object from backup directories as advise
> in the FAQ.
> Can this object manually fixed by any tool? (the object is attached) I
> don't even know to which file/tree/commit it belong how can I know that
> ?
Could you try something like:
git-cat-file -p 4b9458b3786228369c63936db65827de3cc06200
in your repository ?
Thanks,
Christian.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: corrupt object on git-gc
2007-11-08 23:59 ` corrupt " Yossi Leybovich
2007-11-09 5:13 ` Christian Couder
@ 2007-11-09 8:10 ` Alex Riesen
2007-11-09 12:23 ` Yossi Leybovich
2007-11-09 16:17 ` Nicolas Pitre
1 sibling, 2 replies; 10+ messages in thread
From: Alex Riesen @ 2007-11-09 8:10 UTC (permalink / raw)
To: Yossi Leybovich; +Cc: git
Yossi Leybovich, Fri, Nov 09, 2007 00:59:47 +0100:
> 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?
> 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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: corrupt object on git-gc
2007-11-09 5:13 ` Christian Couder
@ 2007-11-09 12:16 ` Yossi Leybovich
2007-11-09 17:45 ` Junio C Hamano
0 siblings, 1 reply; 10+ messages in thread
From: Yossi Leybovich @ 2007-11-09 12:16 UTC (permalink / raw)
To: Christian Couder; +Cc: git
Just tried it :
sleybo@SLEYBO-LT /w/work/EMC/ib.071030.001/ib
$ git-cat-file.exe -p 4b9458b3786228369c63936db65827de3cc06200
error: corrupt loose object '4b9458b3786228369c63936db65827de3cc06200'
fatal: Cannot read object 4b9458b3786228369c63936db65827de3cc06200
Is this say something ?
Yossi
> -----Original Message-----
> From: Christian Couder [mailto:chriscool@tuxfamily.org]
> Sent: Friday, November 09, 2007 12:13 AM
> To: Yossi Leybovich
> Cc: git@vger.kernel.org
> Subject: Re: corrupt object on git-gc
>
> Le vendredi 9 novembre 2007, Yossi Leybovich a écrit :
> >
> > Unfortunately I can't get this object from backup directories as
> advise
> > in the FAQ.
> > Can this object manually fixed by any tool? (the object is attached)
> I
> > don't even know to which file/tree/commit it belong how can I know
> that
> > ?
>
> Could you try something like:
>
> git-cat-file -p 4b9458b3786228369c63936db65827de3cc06200
>
> in your repository ?
>
> Thanks,
> Christian.
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: corrupt object on git-gc
2007-11-09 8:10 ` Alex Riesen
@ 2007-11-09 12:23 ` Yossi Leybovich
2007-11-09 12:56 ` Andreas Ericsson
2007-11-09 16:17 ` Nicolas Pitre
1 sibling, 1 reply; 10+ messages in thread
From: Yossi Leybovich @ 2007-11-09 12:23 UTC (permalink / raw)
To: Alex Riesen; +Cc: git
Hi
I know its loose but still I think there are references in the
repository to this object.
How I can remove it from the repository ?
sleybo@SLEYBO-LT /w/work/EMC/ib.071030.001/ib
$ mv .git/objects/4b ..
sleybo@SLEYBO-LT /w/work/EMC/ib.071030.001/ib
$ git-fsck --full
broken link from tree ca8022a21a064d075d71a342744e584024fd2782
to blob 4b920d658a05a66a9d18dd34b51d6e3a9f229ce1
broken link from commit 2ca27acf05f1631586718b68ce43f0a0400e1f9b
to commit 4b1aabfe3ecc12007535369a2ba17bcee776df64
dangling commit 0d43a63623237385e432572bf61171713dcd8e98
dangling tree b303c073c5d6c30de761a5ecce39ab30da81e98a
dangling tree f3c333f9756e824e6b51e585d734e410790e7dc5
dangling tree 10a4688d94ab6b1fb1bb3aee7e77255a0e41ae94
broken link from tree eea47bf0788a38ac0988de26eddafa8d60caaa58
to blob 4b920d658a05a66a9d18dd34b51d6e3a9f229ce1
broken link from commit 06858a6c8d5a6b1ffbc203057d023c48567dd83e
to tree 4b89da873ce6e1b36a818d70d4665b3074f2354c
dangling commit 4fc6b1127e4a7f4ff5b65a2dd8a90779b5aff3e0
dangling commit 7da607374fe2b1ae09228d2035dd608c73dad7c8
missing tree 4b89da873ce6e1b36a818d70d4665b3074f2354c
broken link from tree 380b2b78d10136cc2b6e1578f4906fccb3e432b1
to blob 4b920d658a05a66a9d18dd34b51d6e3a9f229ce1>
-----Original Message-----
Thanks
Yossi
> From: Alex Riesen [mailto:raa.lkml@gmail.com]
> Sent: Friday, November 09, 2007 3:11 AM
> To: Yossi Leybovich
> Cc: git@vger.kernel.org
> Subject: Re: corrupt object on git-gc
>
> Yossi Leybovich, Fri, Nov 09, 2007 00:59:47 +0100:
> > 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?
>
> > 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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: corrupt object on git-gc
2007-11-09 12:23 ` Yossi Leybovich
@ 2007-11-09 12:56 ` Andreas Ericsson
0 siblings, 0 replies; 10+ messages in thread
From: Andreas Ericsson @ 2007-11-09 12:56 UTC (permalink / raw)
To: Yossi Leybovich; +Cc: Alex Riesen, git
Yossi Leybovich wrote:
> Hi
>
> I know its loose but still I think there are references in the
> repository to this object.
> How I can remove it from the repository ?
>
>
> sleybo@SLEYBO-LT /w/work/EMC/ib.071030.001/ib
> $ mv .git/objects/4b ..
>
That was not a very good idea. You just moved ALL objects whose hash
begin with 4b out of the object database.
Try only moving the offending file out of the 4b directory.
> sleybo@SLEYBO-LT /w/work/EMC/ib.071030.001/ib
> $ git-fsck --full
> to blob 4b920d658a05a66a9d18dd34b51d6e3a9f229ce1
> to commit 4b1aabfe3ecc12007535369a2ba17bcee776df64
> to blob 4b920d658a05a66a9d18dd34b51d6e3a9f229ce1
> to tree 4b89da873ce6e1b36a818d70d4665b3074f2354c
> to blob 4b920d658a05a66a9d18dd34b51d6e3a9f229ce1>
Notice how all of these start with 4b? Move the directory back and
get rid of just the object that causes errors.
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: corrupt object on git-gc
2007-11-09 8:10 ` Alex Riesen
2007-11-09 12:23 ` Yossi Leybovich
@ 2007-11-09 16:17 ` Nicolas Pitre
1 sibling, 0 replies; 10+ messages in thread
From: Nicolas Pitre @ 2007-11-09 16:17 UTC (permalink / raw)
To: Alex Riesen; +Cc: Yossi Leybovich, git
On Fri, 9 Nov 2007, Alex Riesen wrote:
> Yossi Leybovich, Fri, Nov 09, 2007 00:59:47 +0100:
> > 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.
Very wrong. Loose object != unreachable object.
Nicolas
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: corrupt object on git-gc
2007-11-09 12:16 ` Yossi Leybovich
@ 2007-11-09 17:45 ` Junio C Hamano
0 siblings, 0 replies; 10+ messages in thread
From: Junio C Hamano @ 2007-11-09 17:45 UTC (permalink / raw)
To: Yossi Leybovich; +Cc: Christian Couder, git
"Yossi Leybovich" <sleybo@mellanox.co.il> writes:
> Just tried it :
>
> sleybo@SLEYBO-LT /w/work/EMC/ib.071030.001/ib
> $ git-cat-file.exe -p 4b9458b3786228369c63936db65827de3cc06200
> error: corrupt loose object '4b9458b3786228369c63936db65827de3cc06200'
> fatal: Cannot read object 4b9458b3786228369c63936db65827de3cc06200
>
> Is this say something ?
Linus gave a good description of how to diagnose and assess the
extent of damage and potentially recover, so I won't repeat it,
but I am more interested in understanding how the object got
corrupted in the first place.
One thing the above says, with the .exe extension, is that you
are using it on some DOS derived platform. Is this Cygwin? Is
this WinGit? Is this (infamous) "text mount"?
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2007-11-09 17:46 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <6C2C79E72C305246B504CBA17B5500C902535D9C@mtlexch01.mtl.com>
2007-11-08 0:59 ` missing object on git-gc Yossi Leybovich
2007-11-08 5:03 ` Christian Couder
[not found] ` <458BC6B0F287034F92FE78908BD01CE814472B3D@mtlexch01.mtl.com>
2007-11-08 23:59 ` corrupt " Yossi Leybovich
2007-11-09 5:13 ` Christian Couder
2007-11-09 12:16 ` Yossi Leybovich
2007-11-09 17:45 ` Junio C Hamano
2007-11-09 8:10 ` Alex Riesen
2007-11-09 12:23 ` Yossi Leybovich
2007-11-09 12:56 ` Andreas Ericsson
2007-11-09 16:17 ` Nicolas Pitre
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).