public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Nicolas Ferre <nicolas.ferre@atmel•com>
To: Nicolas Pitre <nico@cam•org>
Cc: git@vger•kernel.org
Subject: Re: error: packfile while git fsck
Date: Mon, 03 Nov 2008 17:18:53 +0100	[thread overview]
Message-ID: <490F246D.1040307@atmel.com> (raw)
In-Reply-To: <alpine.LFD.2.00.0810221323270.26244@xanadu.home>

Nicolas Pitre :
> On Wed, 22 Oct 2008, Nicolas Ferre wrote:
> 
>> Nicolas Pitre :
>>> On Wed, 22 Oct 2008, Nicolas Ferre wrote:
>>>
>>>> Hi all,
>>>> (please cc me on response)
>>>>
>>>> I am facing error during git status & git fsck on my tree.
>>>> This tree is cloned from various linux kernel trees.
>>>>
>>>> Here are a sample of the error I see :
>>>>
>>>> $ git fsck
>>>> error: packfile
>>>> .git/objects/pack/pack-2ab31ad1f8cb69d091a56fe936634e4796606d49.pack does
>>>> not
>>>> match index
>>>> error: packfile
>>>> .git/objects/pack/pack-2ab31ad1f8cb69d091a56fe936634e4796606d49.pack
>>>> cannot be
>>>> accessed
>>> [...]
>>>
>>> What git version?
>> $ git --version
>> git version 1.5.3.7
> 
> OK.  Since this is not bleeding edge, it is pretty unlikely that the 
> corruption is due to git itself.  Furthermore, the git packs are always 
> read only once they've been created, meaning that if they weren't 
> corrupted at some point then something outside of git caused the 
> corruption.  You really should consider the possible causes for that 
> (dying disk, pilot error, etc).
> 
> As to recovery... That really depends if you have personal work 
> committed to your repository.  If not then the easiest solution is 
> simply to recreate it by refetching from upstream.   If you have 
> personal work in there then you could try to fetch your work branch into 
> the newly created repository.  The latest git version could help with 
> the extraction of non-corrupted objects out of a bad pack, but if the 
> objects you are interested in are themselves corrupted then your only 
> hope is to have a copy of those objects somewhere else.

Nicolas,

Thanks for your help. I will consider migrating to a brand new git tree 
with my work imported in (it seems that my local work is not affected).

Just to know, as the object I try to access is not present, is there a 
way to rebuild the index to match this mater of fact ?

Regards,
-- 
Nicolas Ferre

      reply	other threads:[~2008-11-03 16:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-22 14:06 error: packfile while git fsck Nicolas Ferre
2008-10-22 14:52 ` Nicolas Pitre
2008-10-22 15:22   ` Nicolas Ferre
2008-10-22 17:35     ` Nicolas Pitre
2008-11-03 16:18       ` Nicolas Ferre [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=490F246D.1040307@atmel.com \
    --to=nicolas.ferre@atmel$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=nico@cam$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox