Re: corrupt object on git-gc
- From
Andreas Ericsson <ae@op5.se>
- Date
- Nov 9, 2007, 13:46 UTC
- Message-ID
- <473464A2.7080003@op5.se>
- In-Reply-To
- <4fe79b4b0711090538wf483ce7j89c518962e89780e@mail.gmail.com>
Yossi Leybovich wrote:
Show 16 quoted lines
> 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.
Show 12 quoted lines
> > > 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