git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Ericsson <ae@op5.se>
To: Yossi Leybovich <sleybo@gmail.com>
Cc: git@vger.kernel.org, Yossi Leybovich <sleybo@mellanox.co.il>
Subject: Re: corrupt object on git-gc
Date: Fri, 09 Nov 2007 14:46:10 +0100	[thread overview]
Message-ID: <473464A2.7080003@op5.se> (raw)
In-Reply-To: <4fe79b4b0711090538wf483ce7j89c518962e89780e@mail.gmail.com>

Yossi Leybovich wrote:
> 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 ?
>>>
> 
>> 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.
> 
> Did not help still the repository look for this object?
> Any one know how can I track this object and understand which file is it
> 

Is this a super-secret project or you can make a tarball of the .git
directory and send it to me? Trying to track down the cause through
email is decidedly slow.

> 
> 
> ib]$ mv .git/objects/4b/9458b3786228369c63936db65827de3cc06200 ../
> 
> ib]$ git-fsck --full
> dangling commit 0d43a63623237385e432572bf61171713dcd8e98
> dangling commit 4fc6b1127e4a7f4ff5b65a2dd8a90779b5aff3e0
> dangling commit 7da607374fe2b1ae09228d2035dd608c73dad7c8
> dangling commit 004ef09ae022c60a30f9cd61f90d18df5db3628e
> dangling commit 85112c6fabb6b8913ab244a8645d67380616eba6
> broken link from    tree 2d9263c6d23595e7cb2a21e5ebbb53655278dff8
>              to    blob 4b9458b3786228369c63936db65827de3cc06200

One tree uses the object. I'm not sure if any commit-objects
use the tree. Try

for b in $(git branch --no-color -a | cut -b3-); do
for rev in $(git rev-list HEAD); do
	git ls-tree -r $rev | grep -q 2d9263c6d23595e7cb2a21e5ebbb53655278dff8
	test $? -eq 0 && echo $rev && break
done
done

If it turns up empty, you *should* be able to safely delete
2d9263c6d23595e7cb2a21e5ebbb53655278dff8 and 
4b9458b3786228369c63936db65827de3cc06200

Make sure to take a backup first though.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

  reply	other threads:[~2007-11-09 13:46 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-09 13:38 corrupt object on git-gc Yossi Leybovich
2007-11-09 13:46 ` Andreas Ericsson [this message]
2007-11-09 15:01   ` Yossi Leybovich
2007-11-09 15:34     ` Johannes Sixt
2007-11-09 15:53       ` Yossi Leybovich
2007-11-09 16:03         ` Johannes Sixt
2007-11-09 16:03         ` Nicolas Pitre
2007-11-09 16:31           ` Yossi Leybovich
2007-11-09 16:52             ` Nicolas Pitre
2007-11-09 16:28 ` Linus Torvalds
2007-11-09 17:28   ` [PATCH] add a howto document about corrupted blob recovery Nicolas Pitre
2007-11-09 17:30     ` Johannes Schindelin
2007-11-26  2:12     ` J. Bruce Fields
2007-11-09 17:53   ` corrupt object on git-gc Yossi Leybovich
2007-11-09 18:02     ` Linus Torvalds
2007-11-09 18:37       ` Yossi Leybovich
2007-11-09 18:55         ` Linus Torvalds
2007-11-09 19:07           ` Mike Hommey
2007-11-09 19:41             ` Yossi Leybovich
2007-11-09 19:52               ` Mike Hommey
     [not found] <6C2C79E72C305246B504CBA17B5500C902535D9C@mtlexch01.mtl.com>
     [not found] ` <458BC6B0F287034F92FE78908BD01CE814472B3D@mtlexch01.mtl.com>
2007-11-08 23:59   ` 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

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=473464A2.7080003@op5.se \
    --to=ae@op5.se \
    --cc=git@vger.kernel.org \
    --cc=sleybo@gmail.com \
    --cc=sleybo@mellanox.co.il \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).