{"thread":{"id":"10715","subject":"missing object on git-gc","startedAt":"2007-11-08T00:59:02Z","lastAt":"2007-11-09T17:45:56Z","messageCount":10,"participants":["Yossi Leybovich","Christian Couder","Alex Riesen","Andreas Ericsson","Nicolas Pitre","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"58783","messageId":"6C2C79E72C305246B504CBA17B5500C9029A3071@mtlexch01.mtl.com","threadId":"10715","inReplyTo":"6C2C79E72C305246B504CBA17B5500C902535D9C@mtlexch01.mtl.com","subject":"missing object on git-gc","fromName":"Yossi Leybovich","fromEmail":"sleybo@mellanox.co.il","sentAt":"2007-11-08T00:59:02Z","receivedAt":"2007-11-08T00:59:02Z","isPatch":false,"sender":{"key":"sleybo@mellanox.co.il","avatar":null},"body":"I am running the git-gc tool over my repository and get the following error:\n \n> git-gc\n...\ndeltifying 3308 objects...\nerror: corrupt loose object '<sha1>'\nfatal: object <sha1> cannot be read .\nerror: failed to run repack\n \nwhen sha1 is 40 bytes number \n \nDoes any one know how I can solve thus issue?\n \nThanks\nYOssi  \n"},{"id":"58795","messageId":"200711080603.41004.chriscool@tuxfamily.org","threadId":"10715","inReplyTo":"6C2C79E72C305246B504CBA17B5500C9029A3071@mtlexch01.mtl.com","subject":"Re: missing object on git-gc","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2007-11-08T05:03:40Z","receivedAt":"2007-11-08T05:03:40Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"There is an entry \"How to fix a broken repository?\" in the Git Faq on the \nwiki:\n\nhttp://git.or.cz/gitwiki/GitFaq#head-ac11406480d09e2df98588e800e41b7256602074\n\nMaybe it can help you.\n\nThe same topic has been discussed at least 3 times on the mailing list.\nBy the way, if you find these discussions on gmane, please tell us so that \nwe can add the links to the FAQ entry. (You can also add them yourself.)\n\nThanks,\nChristian.  \n\nLe jeudi 8 novembre 2007, Yossi Leybovich a écrit :\n> I am running the git-gc tool over my repository and get the following\n> error: \n>\n> > git-gc\n>\n> ...\n> deltifying 3308 objects...\n> error: corrupt loose object '<sha1>'\n> fatal: object <sha1> cannot be read .\n> error: failed to run repack\n>  \n> when sha1 is 40 bytes number\n>  \n> Does any one know how I can solve thus issue?\n>  \n> Thanks\n> YOssi\n> -\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"},{"id":"58955","messageId":"6C2C79E72C305246B504CBA17B5500C9029A36A1@mtlexch01.mtl.com","threadId":"10715","inReplyTo":"458BC6B0F287034F92FE78908BD01CE814472B3D@mtlexch01.mtl.com","subject":"corrupt object on git-gc","fromName":"Yossi Leybovich","fromEmail":"sleybo@mellanox.co.il","sentAt":"2007-11-08T23:59:47Z","receivedAt":"2007-11-08T23:59:47Z","isPatch":false,"sender":{"key":"sleybo@mellanox.co.il","avatar":null},"body":"Hi\n\nI wonder if someone can help in this error\nI tried to do git-gc and got error on corrupted object. \n\nI do the following:\n\n$ git-gc\nGenerating pack...\nDone counting 3037 objects.\nDeltifying 3037 objects...\nerror: corrupt loose object '4b9458b3786228369c63936db65827de3cc06200'\nfatal: object 4b9458b3786228369c63936db65827de3cc06200 cannot be read\nerror: failed to run repack\n\nsleybo@SLEYBO-LT /w/work/EMC/ib.071030.001/ib\n$ cd .git/objects/4b/\n\nsleybo@SLEYBO-LT /w/work/EMC/ib.071030.001/ib/.git/objects/4b\n$ git-fsck-objects.exe 9458b3786228369c63936db65827de3cc06200\nerror: corrupt loose object '4b9458b3786228369c63936db65827de3cc06200'\nerror: 4b9458b3786228369c63936db65827de3cc06200: object corrupt or\nmissing\nerror: invalid parameter: expected sha1, got\n'9458b3786228369c63936db65827de3cc0\n6200'\nmissing blob 4b9458b3786228369c63936db65827de3cc06200\n\nUnfortunately I can't get this object from backup directories as advise\nin the FAQ.\nCan this object manually fixed by any tool? (the object is attached) I\ndon't even know to which file/tree/commit it belong how can I know that\n?\n\nThanks\nYossi\n"},{"id":"58993","messageId":"200711090613.17566.chriscool@tuxfamily.org","threadId":"10715","inReplyTo":"6C2C79E72C305246B504CBA17B5500C9029A36A1@mtlexch01.mtl.com","subject":"Re: corrupt object on git-gc","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2007-11-09T05:13:17Z","receivedAt":"2007-11-09T05:13:17Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Le vendredi 9 novembre 2007, Yossi Leybovich a écrit :\n>\n> Unfortunately I can't get this object from backup directories as advise\n> in the FAQ.\n> Can this object manually fixed by any tool? (the object is attached) I\n> don't even know to which file/tree/commit it belong how can I know that\n> ?\n\nCould you try something like:\n\ngit-cat-file -p 4b9458b3786228369c63936db65827de3cc06200\n\nin your repository ?\n\nThanks,\nChristian.\n"},{"id":"59003","messageId":"20071109081035.GA2794@steel.home","threadId":"10715","inReplyTo":"6C2C79E72C305246B504CBA17B5500C9029A36A1@mtlexch01.mtl.com","subject":"Re: corrupt object on git-gc","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-11-09T08:10:35Z","receivedAt":"2007-11-09T08:10:35Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"Yossi Leybovich, Fri, Nov 09, 2007 00:59:47 +0100:\n> I wonder if someone can help in this error\n> I tried to do git-gc and got error on corrupted object. \n> \n> I do the following:\n> \n> $ git-gc\n> Generating pack...\n> Done counting 3037 objects.\n> Deltifying 3037 objects...\n> error: corrupt loose object '4b9458b3786228369c63936db65827de3cc06200'\n\nIt is loose. Nothing uses it in this repository. What do you need to\nrepair it for?\n\n> fatal: object 4b9458b3786228369c63936db65827de3cc06200 cannot be read\n> error: failed to run repack\n> \n> sleybo@SLEYBO-LT /w/work/EMC/ib.071030.001/ib\n> $ cd .git/objects/4b/\n> \n> sleybo@SLEYBO-LT /w/work/EMC/ib.071030.001/ib/.git/objects/4b\n> $ git-fsck-objects.exe 9458b3786228369c63936db65827de3cc06200\n> error: corrupt loose object '4b9458b3786228369c63936db65827de3cc06200'\n> error: 4b9458b3786228369c63936db65827de3cc06200: object corrupt or\n> missing\n> error: invalid parameter: expected sha1, got\n> '9458b3786228369c63936db65827de3cc06200'\n> missing blob 4b9458b3786228369c63936db65827de3cc06200\n\nthe directories directly under .git/objects contain the first bytes of\nsha1, to use filesystem in a more efficient way. git-fsck expects an\nsha1 (or a reference).\n\nTry running moving the corrupt object (with its *whole* name) some\nplace else and run git-fsck --all.\n"},{"id":"59034","messageId":"6C2C79E72C305246B504CBA17B5500C9029A36F1@mtlexch01.mtl.com","threadId":"10715","inReplyTo":"200711090613.17566.chriscool@tuxfamily.org","subject":"RE: corrupt object on git-gc","fromName":"Yossi Leybovich","fromEmail":"sleybo@mellanox.co.il","sentAt":"2007-11-09T12:16:39Z","receivedAt":"2007-11-09T12:16:39Z","isPatch":false,"sender":{"key":"sleybo@mellanox.co.il","avatar":null},"body":"\nJust tried it :\n\nsleybo@SLEYBO-LT /w/work/EMC/ib.071030.001/ib\n$ git-cat-file.exe -p 4b9458b3786228369c63936db65827de3cc06200\nerror: corrupt loose object '4b9458b3786228369c63936db65827de3cc06200'\nfatal: Cannot read object 4b9458b3786228369c63936db65827de3cc06200\n\nIs this say something ?\n\nYossi \n\n> -----Original Message-----\n> From: Christian Couder [mailto:chriscool@tuxfamily.org]\n> Sent: Friday, November 09, 2007 12:13 AM\n> To: Yossi Leybovich\n> Cc: git@vger.kernel.org\n> Subject: Re: corrupt object on git-gc\n> \n> Le vendredi 9 novembre 2007, Yossi Leybovich a écrit :\n> >\n> > Unfortunately I can't get this object from backup directories as\n> advise\n> > in the FAQ.\n> > Can this object manually fixed by any tool? (the object is attached)\n> I\n> > don't even know to which file/tree/commit it belong how can I know\n> that\n> > ?\n> \n> Could you try something like:\n> \n> git-cat-file -p 4b9458b3786228369c63936db65827de3cc06200\n> \n> in your repository ?\n> \n> Thanks,\n> Christian.\n"},{"id":"59035","messageId":"6C2C79E72C305246B504CBA17B5500C9029A36F2@mtlexch01.mtl.com","threadId":"10715","inReplyTo":"20071109081035.GA2794@steel.home","subject":"RE: corrupt object on git-gc","fromName":"Yossi Leybovich","fromEmail":"sleybo@mellanox.co.il","sentAt":"2007-11-09T12:23:11Z","receivedAt":"2007-11-09T12:23:11Z","isPatch":false,"sender":{"key":"sleybo@mellanox.co.il","avatar":null},"body":"Hi\n\n I know its loose but still I think there are references in the\nrepository to this object.\nHow I can remove it from the repository ?\n\n\nsleybo@SLEYBO-LT /w/work/EMC/ib.071030.001/ib\n$ mv .git/objects/4b ..\n\nsleybo@SLEYBO-LT /w/work/EMC/ib.071030.001/ib\n$ git-fsck --full\nbroken link from    tree ca8022a21a064d075d71a342744e584024fd2782\n              to    blob 4b920d658a05a66a9d18dd34b51d6e3a9f229ce1\nbroken link from  commit 2ca27acf05f1631586718b68ce43f0a0400e1f9b\n              to  commit 4b1aabfe3ecc12007535369a2ba17bcee776df64\ndangling commit 0d43a63623237385e432572bf61171713dcd8e98\ndangling tree b303c073c5d6c30de761a5ecce39ab30da81e98a\ndangling tree f3c333f9756e824e6b51e585d734e410790e7dc5\ndangling tree 10a4688d94ab6b1fb1bb3aee7e77255a0e41ae94\nbroken link from    tree eea47bf0788a38ac0988de26eddafa8d60caaa58\n              to    blob 4b920d658a05a66a9d18dd34b51d6e3a9f229ce1\nbroken link from  commit 06858a6c8d5a6b1ffbc203057d023c48567dd83e\n              to    tree 4b89da873ce6e1b36a818d70d4665b3074f2354c\ndangling commit 4fc6b1127e4a7f4ff5b65a2dd8a90779b5aff3e0\ndangling commit 7da607374fe2b1ae09228d2035dd608c73dad7c8\nmissing tree 4b89da873ce6e1b36a818d70d4665b3074f2354c\nbroken link from    tree 380b2b78d10136cc2b6e1578f4906fccb3e432b1\n              to    blob 4b920d658a05a66a9d18dd34b51d6e3a9f229ce1>\n-----Original Message-----\n\n\n\nThanks\nYossi \n\n\n\n\n> From: Alex Riesen [mailto:raa.lkml@gmail.com]\n> Sent: Friday, November 09, 2007 3:11 AM\n> To: Yossi Leybovich\n> Cc: git@vger.kernel.org\n> Subject: Re: corrupt object on git-gc\n> \n> Yossi Leybovich, Fri, Nov 09, 2007 00:59:47 +0100:\n> > I wonder if someone can help in this error\n> > I tried to do git-gc and got error on corrupted object.\n> >\n> > I do the following:\n> >\n> > $ git-gc\n> > Generating pack...\n> > Done counting 3037 objects.\n> > Deltifying 3037 objects...\n> > error: corrupt loose object\n> '4b9458b3786228369c63936db65827de3cc06200'\n> \n> It is loose. Nothing uses it in this repository. What do you need to\n> repair it for?\n> \n> > fatal: object 4b9458b3786228369c63936db65827de3cc06200 cannot be\nread\n> > error: failed to run repack\n> >\n> > sleybo@SLEYBO-LT /w/work/EMC/ib.071030.001/ib\n> > $ cd .git/objects/4b/\n> >\n> > sleybo@SLEYBO-LT /w/work/EMC/ib.071030.001/ib/.git/objects/4b\n> > $ git-fsck-objects.exe 9458b3786228369c63936db65827de3cc06200\n> > error: corrupt loose object\n> '4b9458b3786228369c63936db65827de3cc06200'\n> > error: 4b9458b3786228369c63936db65827de3cc06200: object corrupt or\n> > missing\n> > error: invalid parameter: expected sha1, got\n> > '9458b3786228369c63936db65827de3cc06200'\n> > missing blob 4b9458b3786228369c63936db65827de3cc06200\n> \n> the directories directly under .git/objects contain the first bytes of\n> sha1, to use filesystem in a more efficient way. git-fsck expects an\n> sha1 (or a reference).\n> \n> Try running moving the corrupt object (with its *whole* name) some\n> place else and run git-fsck --all.\n"},{"id":"59037","messageId":"4734590D.6000104@op5.se","threadId":"10715","inReplyTo":"6C2C79E72C305246B504CBA17B5500C9029A36F2@mtlexch01.mtl.com","subject":"Re: corrupt object on git-gc","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2007-11-09T12:56:45Z","receivedAt":"2007-11-09T12:56:45Z","isPatch":false,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"Yossi Leybovich wrote:\n> Hi\n> \n>  I know its loose but still I think there are references in the\n> repository to this object.\n> How I can remove it from the repository ?\n> \n> \n> sleybo@SLEYBO-LT /w/work/EMC/ib.071030.001/ib\n> $ mv .git/objects/4b ..\n> \n\nThat was not a very good idea. You just moved ALL objects whose hash\nbegin with 4b out of the object database.\n\nTry only moving the offending file out of the 4b directory.\n\n> sleybo@SLEYBO-LT /w/work/EMC/ib.071030.001/ib\n> $ git-fsck --full\n>               to    blob 4b920d658a05a66a9d18dd34b51d6e3a9f229ce1\n>               to  commit 4b1aabfe3ecc12007535369a2ba17bcee776df64\n>               to    blob 4b920d658a05a66a9d18dd34b51d6e3a9f229ce1\n>               to    tree 4b89da873ce6e1b36a818d70d4665b3074f2354c\n>               to    blob 4b920d658a05a66a9d18dd34b51d6e3a9f229ce1>\n\nNotice how all of these start with 4b? Move the directory back and\nget rid of just the object that causes errors.\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n"},{"id":"59074","messageId":"alpine.LFD.0.9999.0711091116470.21255@xanadu.home","threadId":"10715","inReplyTo":"20071109081035.GA2794@steel.home","subject":"Re: corrupt object on git-gc","fromName":"Nicolas Pitre","fromEmail":"nico@cam.org","sentAt":"2007-11-09T16:17:33Z","receivedAt":"2007-11-09T16:17:33Z","isPatch":false,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"On Fri, 9 Nov 2007, Alex Riesen wrote:\n\n> Yossi Leybovich, Fri, Nov 09, 2007 00:59:47 +0100:\n> > I wonder if someone can help in this error\n> > I tried to do git-gc and got error on corrupted object. \n> > \n> > I do the following:\n> > \n> > $ git-gc\n> > Generating pack...\n> > Done counting 3037 objects.\n> > Deltifying 3037 objects...\n> > error: corrupt loose object '4b9458b3786228369c63936db65827de3cc06200'\n> \n> It is loose. Nothing uses it in this repository.\n\nVery wrong.  Loose object != unreachable object.\n\n\nNicolas\n"},{"id":"59095","messageId":"7vy7d7tiqz.fsf@gitster.siamese.dyndns.org","threadId":"10715","inReplyTo":"6C2C79E72C305246B504CBA17B5500C9029A36F1@mtlexch01.mtl.com","subject":"Re: corrupt object on git-gc","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-11-09T17:45:56Z","receivedAt":"2007-11-09T17:45:56Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Yossi Leybovich\" <sleybo@mellanox.co.il> writes:\n\n> Just tried it :\n>\n> sleybo@SLEYBO-LT /w/work/EMC/ib.071030.001/ib\n> $ git-cat-file.exe -p 4b9458b3786228369c63936db65827de3cc06200\n> error: corrupt loose object '4b9458b3786228369c63936db65827de3cc06200'\n> fatal: Cannot read object 4b9458b3786228369c63936db65827de3cc06200\n>\n> Is this say something ?\n\nLinus gave a good description of how to diagnose and assess the\nextent of damage and potentially recover, so I won't repeat it,\nbut I am more interested in understanding how the object got\ncorrupted in the first place.\n\nOne thing the above says, with the .exe extension, is that you\nare using it on some DOS derived platform.  Is this Cygwin?  Is\nthis WinGit?  Is this (infamous) \"text mount\"?\n"}]}