git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: how to remove unreachable objects?

From
Jeff King <peff@peff.net>
Date
Sep 19, 2011, 22:52 UTC
Message-ID
<20110919225219.GD4056@sigill.intra.peff.net>
In-Reply-To
<7vsjns8b6m.fsf@alter.siamese.dyndns.org>
On Mon, Sep 19, 2011 at 02:38:41PM -0700, Junio C Hamano wrote:
Show 15 quoted lines
> Yeah, I've been thinking about making it an error to give refs to fsck, as
> I do not think the use cases for feature justifies the possible confusion
> it may cause.
>
> 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.

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 9 in “how to remove unreachable objects?”
  1. dieter@schoen.or.atSep 19, 2011
  2. Jeff KingSep 19, 2011
  3. Jeff KingSep 19, 2011
  4. Junio C HamanoSep 19, 2011
  5. Jeff KingSep 19, 2011
  6. Junio C HamanoSep 20, 2011
  7. Jeff KingSep 20, 2011
  8. Dieter SchönSep 24, 2011
  9. Andreas SchwabSep 19, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.