{"thread":{"id":"16010","subject":"error: packfile while git fsck","startedAt":"2008-10-22T14:06:55Z","lastAt":"2008-11-03T16:18:53Z","messageCount":5,"participants":["Nicolas Ferre","Nicolas Pitre"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"93688","messageId":"48FF337F.3050505@atmel.com","threadId":"16010","inReplyTo":null,"subject":"error: packfile while git fsck","fromName":"Nicolas Ferre","fromEmail":"nicolas.ferre@atmel.com","sentAt":"2008-10-22T14:06:55Z","receivedAt":"2008-10-22T14:06:55Z","isPatch":false,"sender":{"key":"nicolas.ferre@atmel.com","avatar":"https://gravatar.com/avatar/3d7c54c57a9dfad66bada79647c3e4cecb356f3449f32ec723b1eba41bb3afdf?d=mp&s=160"},"body":"Hi all,\n(please cc me on response)\n\nI am facing error during git status & git fsck on my tree.\nThis tree is cloned from various linux kernel trees.\n\nHere are a sample of the error I see :\n\n$ git fsck\nerror: packfile .git/objects/pack/pack-2ab31ad1f8cb69d091a56fe936634e4796606d49.pack does not match index\nerror: packfile .git/objects/pack/pack-2ab31ad1f8cb69d091a56fe936634e4796606d49.pack cannot be accessed\nerror: packfile .git/objects/pack/pack-2ab31ad1f8cb69d091a56fe936634e4796606d49.pack does not match index\nerror: packfile .git/objects/pack/pack-2ab31ad1f8cb69d091a56fe936634e4796606d49.pack cannot be accessed\nerror: packfile .git/objects/pack/pack-2ab31ad1f8cb69d091a56fe936634e4796606d49.pack does not match index\n[..]\nerror: packfile .git/objects/pack/pack-2ab31ad1f8cb69d091a56fe936634e4796606d49.pack cannot be accessed\ndangling blob fe130d58453393f15e0db82bca18f35998689a87\ndangling commit 2515ddc6db8eb49a79f0fe5e67ff09ac7c81eab4\nerror: packfile .git/objects/pack/pack-2ab31ad1f8cb69d091a56fe936634e4796606d49.pack does not match index\nerror: packfile .git/objects/pack/pack-2ab31ad1f8cb69d091a56fe936634e4796606d49.pack cannot be accessed\nerror: packfile .git/objects/pack/pack-2ab31ad1f8cb69d091a56fe936634e4796606d49.pack does not match index\nerror: packfile .git/objects/pack/pack-2ab31ad1f8cb69d091a56fe936634e4796606d49.pack cannot be accessed\nerror: packfile .git/objects/pack/pack-2ab31ad1f8cb69d091a56fe936634e4796606d49.pack does not match index\nerror: packfile .git/objects/pack/pack-2ab31ad1f8cb69d091a56fe936634e4796606d49.pack cannot be accessed\ndangling commit 6bb7a935489dab20802dde6c2cb7d8582f4849bf\nerror: packfile .git/objects/pack/pack-2ab31ad1f8cb69d091a56fe936634e4796606d49.pack does not match index\nerror: packfile .git/objects/pack/pack-2ab31ad1f8cb69d091a56fe936634e4796606d49.pack cannot be accessed\ndangling commit 4aba41ea8bdc1b475861f5e5c1649ab20251090c\nerror: packfile .git/objects/pack/pack-2ab31ad1f8cb69d091a56fe936634e4796606d49.pack does not match index\nerror: packfile .git/objects/pack/pack-2ab31ad1f8cb69d091a56fe936634e4796606d49.pack cannot be accessed\n[..]\n$  git verify-pack .git/objects/pack/pack-2ab31ad1f8cb69d091a56fe936634e4796606d49.pack\npack-2ab31ad1f8cb69d091a56fe936634e4796606d49.pack\nnferre@bendor:linux-2.6-arm > git verify-pack .git/objects/pack/pack-2ab31ad1f8cb69d091a56fe936634e4796606d49.pack\nerror: packfile .git/objects/pack/pack-2ab31ad1f8cb69d091a56fe936634e4796606d49.pack does not match index\nfatal: packfile .git/objects/pack/pack-2ab31ad1f8cb69d091a56fe936634e4796606d49.pack cannot be accessed\n\nWhat can I do to recover my git archive ?\n\nDid I do something wrong (merging files while fetching) ?\n\nIs it related to a known issue (I cannot figure out if it is \nafter some googling) ?\n\nThanks for your help. Regards,\n-- \nNicolas Ferre\n"},{"id":"93689","messageId":"alpine.LFD.2.00.0810221049340.26244@xanadu.home","threadId":"16010","inReplyTo":"48FF337F.3050505@atmel.com","subject":"Re: error: packfile while git fsck","fromName":"Nicolas Pitre","fromEmail":"nico@cam.org","sentAt":"2008-10-22T14:52:16Z","receivedAt":"2008-10-22T14:52:16Z","isPatch":false,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"On Wed, 22 Oct 2008, Nicolas Ferre wrote:\n\n> Hi all,\n> (please cc me on response)\n> \n> I am facing error during git status & git fsck on my tree.\n> This tree is cloned from various linux kernel trees.\n> \n> Here are a sample of the error I see :\n> \n> $ git fsck\n> error: packfile\n> .git/objects/pack/pack-2ab31ad1f8cb69d091a56fe936634e4796606d49.pack does not\n> match index\n> error: packfile\n> .git/objects/pack/pack-2ab31ad1f8cb69d091a56fe936634e4796606d49.pack cannot be\n> accessed\n[...]\n\nWhat git version?\n\n> Did I do something wrong (merging files while fetching) ?\n\nUnlikely.\n\n\nNicolas\n"},{"id":"93696","messageId":"48FF4521.5070303@atmel.com","threadId":"16010","inReplyTo":"alpine.LFD.2.00.0810221049340.26244@xanadu.home","subject":"Re: error: packfile while git fsck","fromName":"Nicolas Ferre","fromEmail":"nicolas.ferre@atmel.com","sentAt":"2008-10-22T15:22:09Z","receivedAt":"2008-10-22T15:22:09Z","isPatch":false,"sender":{"key":"nicolas.ferre@atmel.com","avatar":"https://gravatar.com/avatar/3d7c54c57a9dfad66bada79647c3e4cecb356f3449f32ec723b1eba41bb3afdf?d=mp&s=160"},"body":"Nicolas Pitre :\n> On Wed, 22 Oct 2008, Nicolas Ferre wrote:\n> \n>> Hi all,\n>> (please cc me on response)\n>>\n>> I am facing error during git status & git fsck on my tree.\n>> This tree is cloned from various linux kernel trees.\n>>\n>> Here are a sample of the error I see :\n>>\n>> $ git fsck\n>> error: packfile\n>> .git/objects/pack/pack-2ab31ad1f8cb69d091a56fe936634e4796606d49.pack does not\n>> match index\n>> error: packfile\n>> .git/objects/pack/pack-2ab31ad1f8cb69d091a56fe936634e4796606d49.pack cannot be\n>> accessed\n> [...]\n> \n> What git version?\n\n$ git --version\ngit version 1.5.3.7\n\nKind regards,\n-- \nNicolas Ferre\n"},{"id":"93703","messageId":"alpine.LFD.2.00.0810221323270.26244@xanadu.home","threadId":"16010","inReplyTo":"48FF4521.5070303@atmel.com","subject":"Re: error: packfile while git fsck","fromName":"Nicolas Pitre","fromEmail":"nico@cam.org","sentAt":"2008-10-22T17:35:59Z","receivedAt":"2008-10-22T17:35:59Z","isPatch":false,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"On Wed, 22 Oct 2008, Nicolas Ferre wrote:\n\n> Nicolas Pitre :\n> > On Wed, 22 Oct 2008, Nicolas Ferre wrote:\n> > \n> > > Hi all,\n> > > (please cc me on response)\n> > > \n> > > I am facing error during git status & git fsck on my tree.\n> > > This tree is cloned from various linux kernel trees.\n> > > \n> > > Here are a sample of the error I see :\n> > > \n> > > $ git fsck\n> > > error: packfile\n> > > .git/objects/pack/pack-2ab31ad1f8cb69d091a56fe936634e4796606d49.pack does\n> > > not\n> > > match index\n> > > error: packfile\n> > > .git/objects/pack/pack-2ab31ad1f8cb69d091a56fe936634e4796606d49.pack\n> > > cannot be\n> > > accessed\n> > [...]\n> > \n> > What git version?\n> \n> $ git --version\n> git version 1.5.3.7\n\nOK.  Since this is not bleeding edge, it is pretty unlikely that the \ncorruption is due to git itself.  Furthermore, the git packs are always \nread only once they've been created, meaning that if they weren't \ncorrupted at some point then something outside of git caused the \ncorruption.  You really should consider the possible causes for that \n(dying disk, pilot error, etc).\n\nAs to recovery... That really depends if you have personal work \ncommitted to your repository.  If not then the easiest solution is \nsimply to recreate it by refetching from upstream.   If you have \npersonal work in there then you could try to fetch your work branch into \nthe newly created repository.  The latest git version could help with \nthe extraction of non-corrupted objects out of a bad pack, but if the \nobjects you are interested in are themselves corrupted then your only \nhope is to have a copy of those objects somewhere else.\n\n\nNicolas\n"},{"id":"94775","messageId":"490F246D.1040307@atmel.com","threadId":"16010","inReplyTo":"alpine.LFD.2.00.0810221323270.26244@xanadu.home","subject":"Re: error: packfile while git fsck","fromName":"Nicolas Ferre","fromEmail":"nicolas.ferre@atmel.com","sentAt":"2008-11-03T16:18:53Z","receivedAt":"2008-11-03T16:18:53Z","isPatch":false,"sender":{"key":"nicolas.ferre@atmel.com","avatar":"https://gravatar.com/avatar/3d7c54c57a9dfad66bada79647c3e4cecb356f3449f32ec723b1eba41bb3afdf?d=mp&s=160"},"body":"Nicolas Pitre :\n> On Wed, 22 Oct 2008, Nicolas Ferre wrote:\n> \n>> Nicolas Pitre :\n>>> On Wed, 22 Oct 2008, Nicolas Ferre wrote:\n>>>\n>>>> Hi all,\n>>>> (please cc me on response)\n>>>>\n>>>> I am facing error during git status & git fsck on my tree.\n>>>> This tree is cloned from various linux kernel trees.\n>>>>\n>>>> Here are a sample of the error I see :\n>>>>\n>>>> $ git fsck\n>>>> error: packfile\n>>>> .git/objects/pack/pack-2ab31ad1f8cb69d091a56fe936634e4796606d49.pack does\n>>>> not\n>>>> match index\n>>>> error: packfile\n>>>> .git/objects/pack/pack-2ab31ad1f8cb69d091a56fe936634e4796606d49.pack\n>>>> cannot be\n>>>> accessed\n>>> [...]\n>>>\n>>> What git version?\n>> $ git --version\n>> git version 1.5.3.7\n> \n> OK.  Since this is not bleeding edge, it is pretty unlikely that the \n> corruption is due to git itself.  Furthermore, the git packs are always \n> read only once they've been created, meaning that if they weren't \n> corrupted at some point then something outside of git caused the \n> corruption.  You really should consider the possible causes for that \n> (dying disk, pilot error, etc).\n> \n> As to recovery... That really depends if you have personal work \n> committed to your repository.  If not then the easiest solution is \n> simply to recreate it by refetching from upstream.   If you have \n> personal work in there then you could try to fetch your work branch into \n> the newly created repository.  The latest git version could help with \n> the extraction of non-corrupted objects out of a bad pack, but if the \n> objects you are interested in are themselves corrupted then your only \n> hope is to have a copy of those objects somewhere else.\n\nNicolas,\n\nThanks for your help. I will consider migrating to a brand new git tree \nwith my work imported in (it seems that my local work is not affected).\n\nJust to know, as the object I try to access is not present, is there a \nway to rebuild the index to match this mater of fact ?\n\nRegards,\n-- \nNicolas Ferre\n"}]}