From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Nicolas Pitre <nico@fluxnic.net>
Cc: Jonathan Nieder <jrnieder@gmail.com>, git@vger.kernel.org
Subject: Re: fetch and bundle don't work in (semi-)broken repo
Date: Wed, 20 Oct 2010 09:59:45 +0200 [thread overview]
Message-ID: <20101020075945.GD28166@pengutronix.de> (raw)
In-Reply-To: <alpine.LFD.2.00.1010191635030.2764@xanadu.home>
Hello,
On Tue, Oct 19, 2010 at 04:48:23PM -0400, Nicolas Pitre wrote:
> On Tue, 19 Oct 2010, Uwe Kleine-König wrote:
>
> > Hi Jonathan,
> >
> > On Tue, Oct 19, 2010 at 01:39:25PM -0500, Jonathan Nieder wrote:
> > > Uwe Kleine-König wrote:
> > >
> > > > ukl@hostname:~/path1/linux-2.6$ git fetch ~/path2/linux-2.6 sectionmismatches
> > > > remote: Counting objects: 118, done.
> > > > remote: error: unable to find 40aaeb204dc04d3cf15c060133f65538b43b13b0
> > > > remote: Compressing objects: 100% (83/83), done.
> > > > remote: fatal: unable to read 40aaeb204dc04d3cf15c060133f65538b43b13b0
> > > > error: git upload-pack: git-pack-objects died with error.
> > > > fatal: git upload-pack: aborting due to possible repository corruption on the remote side.
> > >
> > > Sounds like alternates or workdir allowed gc to be overzealous, indeed.
> > >
> > > Could you:
> > >
> > > 1. Make a copy of the corrupted repo, just in case.
> > > 2. Explode all backs with "git unpack-objects"
>
> That's usually unnecessary. If the pack itself is corrupted, trying to
> unpack it all won't help.
>
> > I did:
> >
> > mv .git/objects/pack .git/objects/pack.bak
> > rm .git/objects/info/alternates
> > for p in .git/objects/pack.bak/*.pack ~/path1/linux-2.6/.git/objects/pack/*.pack; do
> > git unpack-objects < $p
> > done
>
> Ouch! You will end up with a multi-gigabyte repository, which will be
> abominably slow.
>
> > > 3. Identify the missing object, as explained in
> > > Documentation/howto/recover-corrupted-blob-object.txt?
>
> That's useful when you have only one corrupted object and you want to
> recreate it from raw material. But ideally you should simply find a
> pack that contains the problematic object in another repository and copy
> it with its index
> file into the broken repository.
>
> > and I'm running git-fsck --full now over night as it's bedtime here.
>
> Given that you exploded your repo into loose objects, it'll take _time_.
Well it took 34 minutes, which is OK I guess.
I will study the output a bit now.
For the interested (all lines matching "dangling" removed):
22:10:57 I: Started git fsck --full
22:44:14 O: broken link from tree 519af383e181399db929823299bbd14c04b4229a
22:44:14 O: to tree d58c333c44672cb933df5a353dfb63ac571964e8
22:44:14 O: broken link from commit e8f7f6a23979c398249a15fb71b3e52dae933fa3
22:44:14 O: to tree 7f22979d86cf00c8bd3487feb973353ab5a1beee
22:44:14 O: broken link from commit 3164f6598ae44703a89822ced9746c1876ba7fab
22:44:14 O: to tree 1017bb1f45b8527ee3c7cfc30288b8098bcf0915
22:44:14 O: broken link from commit 124dde2ea387dc9509b0a5574c6f44f7d348a65d
22:44:14 O: to tree e4d0ac236995847e4e1d15c6d0afb47787255703
22:44:14 O: broken link from commit 60deff2fffd90b217d90284295d5a910f21fe98e
22:44:14 O: to tree 18bb32cfd08228820f929d62e63933fe2896b424
22:44:14 O: broken link from commit 0b84e651b84dba73772fda15a8a66de8cc274af0
22:44:14 O: to tree f8939a09d73b78459381b7991423529592e66324
22:44:14 O: broken link from commit e0de1d3c3355f9b1e3474417f05657a1041e7c8a
22:44:14 O: to tree 776ad9ac45dab11f2644151a690e1035789a49b6
22:44:14 O: broken link from commit 76d1acb95eef413a2501a63cb7f7f4036b71ed37
22:44:14 O: to commit f6b6cb2336198913371e66664f28c135df01aea5
22:44:14 O: broken link from tree bb473ad85c260b6a1659aa2059cac23b337842e3
22:44:14 O: to tree e035bc14698cc3e9abfca1a174feacb25e7e262a
22:44:14 O: broken link from tree bb473ad85c260b6a1659aa2059cac23b337842e3
22:44:14 O: to tree 8908b2458c1a2c6a6db81e88d96a01aa9a89abe5
22:44:14 O: broken link from tree ee35b3a549f45830ed50eb1032836a71ab2b7886
22:44:14 O: to tree f2f33722af4b5e32ac17f914cf24cc96c6e80077
22:44:14 O: broken link from tree ee35b3a549f45830ed50eb1032836a71ab2b7886
22:44:14 O: to tree 70f0188991b8406ec6ec75a504cf50c778fc1001
22:44:14 O: broken link from tree 1772732da7d4751d3c0febd7b0ceee61a84702f0
22:44:14 O: to tree dc3c1a018fcf2797a860af0cb899fe6be1173da3
22:44:14 O: broken link from tree 1772732da7d4751d3c0febd7b0ceee61a84702f0
22:44:14 O: to tree 2ade2c0731e57fc6b1baddb6faf683847d706179
22:44:14 O: broken link from tree 1772732da7d4751d3c0febd7b0ceee61a84702f0
22:44:14 O: to tree 659f4a6280150b7ae7b8f824257ad3cbb7cd1788
22:44:14 O: broken link from tree f29915a03ea5ba8739aacfcbb349d40b019481ed
22:44:14 O: to tree b52d608d7743b1e096725d4b8d7c7769b19f6674
22:44:15 O: missing tree 7f22979d86cf00c8bd3487feb973353ab5a1beee
22:44:15 O: missing tree 70f0188991b8406ec6ec75a504cf50c778fc1001
22:44:15 O: missing tree dc3c1a018fcf2797a860af0cb899fe6be1173da3
22:44:15 O: missing tree f8939a09d73b78459381b7991423529592e66324
22:44:15 O: missing tree e4d0ac236995847e4e1d15c6d0afb47787255703
22:44:15 O: missing tree 2ade2c0731e57fc6b1baddb6faf683847d706179
22:44:15 O: missing tree 8908b2458c1a2c6a6db81e88d96a01aa9a89abe5
22:44:15 O: missing tree 18bb32cfd08228820f929d62e63933fe2896b424
22:44:15 O: missing tree d58c333c44672cb933df5a353dfb63ac571964e8
22:44:15 O: missing tree f2f33722af4b5e32ac17f914cf24cc96c6e80077
22:44:16 O: missing tree 1017bb1f45b8527ee3c7cfc30288b8098bcf0915
22:44:16 O: missing tree e035bc14698cc3e9abfca1a174feacb25e7e262a
22:44:16 O: missing tree 659f4a6280150b7ae7b8f824257ad3cbb7cd1788
22:44:16 O: missing commit f6b6cb2336198913371e66664f28c135df01aea5
22:44:16 O: missing tree 776ad9ac45dab11f2644151a690e1035789a49b6
22:44:16 O: missing tree b52d608d7743b1e096725d4b8d7c7769b19f6674
22:44:16 O: missing blob 40aaeb204dc04d3cf15c060133f65538b43b13b0
Here is the output for the object bundle and fetch wail about, but
nothing about a tree that would need it :-( Actually it's the only one
of the missing objects that is not described above (and it's the only
blob).
22:44:17 I: Finished with exitcode 2
Now I'm running
git for-each-ref | while read sha type name; do
echo $name;
git log --raw --full-history $sha | grep 40aaeb204dc04d3cf15c060133f65538b43b13b0;
done
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
prev parent reply other threads:[~2010-10-20 7:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-19 16:09 fetch and bundle don't work in (semi-)broken repo Uwe Kleine-König
2010-10-19 18:39 ` Jonathan Nieder
2010-10-19 20:11 ` Uwe Kleine-König
2010-10-19 20:48 ` Nicolas Pitre
2010-10-19 21:02 ` Jonathan Nieder
2010-10-20 3:06 ` Nicolas Pitre
2010-10-20 7:41 ` Uwe Kleine-König
2010-10-20 13:38 ` Nicolas Pitre
[not found] ` <20101020150810.GE19834@pengutronix.de>
[not found] ` <alpine.LFD.2.00.1010201301130.2764@xanadu.home>
2010-10-21 7:11 ` format-patch broken [Was: fetch and bundle don't work in (semi-)broken repo] Uwe Kleine-König
2010-10-21 8:12 ` Uwe Kleine-König
2010-10-22 3:53 ` Nicolas Pitre
2010-10-20 7:59 ` Uwe Kleine-König [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=20101020075945.GD28166@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
--cc=nico@fluxnic.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.