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

Re: how to remove unreachable objects?

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 19, 2011, 21:38 UTC
Message-ID
<7vsjns8b6m.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20110919201804.GB31930@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 6 quoted lines
> I was tempted to just drop this section entirely. It's mostly redundant
> with the DESCRIPTION section, and any extra details could be folded in
> there. The most useful bit is the "what do you do when there is
> corruption". But that should perhaps get its own section, if somebody
> feels like writing something more detailed (I thought we had a guide
> somewhere, but I couldn't find it).

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.

Previous: Jeff KingNext: Jeff King
Message 4 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.