public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Jeff King <peff@peff•net>
Cc: dieter@schoen•or.at, git@vger•kernel.org
Subject: Re: how to remove unreachable objects?
Date: Mon, 19 Sep 2011 17:40:03 -0700	[thread overview]
Message-ID: <7vfwjs82sc.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20110919225219.GD4056@sigill.intra.peff.net> (Jeff King's message of "Mon, 19 Sep 2011 18:52:19 -0400")

Jeff King <peff@peff•net> writes:

>> One possible use case might be when your repository is corrupt, and does
>> not pass "git fsck" (without any argument).  In such a case, if you are
>> lucky and your disk corrupted objects only reachable from a recent topic
>> branch, you might find that this command:
>> 
>> 	$ git fsck master next ...list other topics here...
>> 
>> still succeeds, so that you can figure out which topic makes such a
>> limited fsck fail when it is listed on the command line, judge its
>> importance and resurrect what you can from there, before nuking it to
>> bring the repository back in health so that you can recreate the topic.
>
> Does that work? I had the impression from the documentation that the
> arguments are purely about the reachability analysis, and that the
> actual corruption/correctness checks actually look through the object db
> directly, making sure each object is well-formed. Skimming cmd_fsck
> seems to confirm that.

You are right that you may see "corrupt object" for unreachable from the
tips in the object store, but I was talking more about verifying
everything that is needed for reachability analysis from the given tips
can be read, iow, "missing object" errors, lack of which would mean you
can salvage everything reachable from the refs involved in the traversal.

  reply	other threads:[~2011-09-20  0:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-19  9:08 how to remove unreachable objects? dieter
2011-09-19 19:53 ` Jeff King
2011-09-19 20:18   ` Jeff King
2011-09-19 21:38     ` Junio C Hamano
2011-09-19 22:52       ` Jeff King
2011-09-20  0:40         ` Junio C Hamano [this message]
2011-09-20  0:51           ` Jeff King
2011-09-24 22:11   ` Dieter Schön
2011-09-19 20:36 ` Andreas Schwab

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=7vfwjs82sc.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox$(echo .)com \
    --cc=dieter@schoen$(echo .)or.at \
    --cc=git@vger$(echo .)kernel.org \
    --cc=peff@peff$(echo .)net \
    /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