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

Re: fsck option to remove corrupt objects - why/why not?

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 16, 2014, 16:36 UTC
Message-ID
<xmqq8ukgug31.fsf@gitster.dls.corp.google.com>
In-Reply-To
<CALKQrgda8mVbqP5=Ag8juN9HMQp7iQ9eDJETfRJe1b0taAFGkg@mail.gmail.com>
Johan Herland <johan@herland.net> writes:
Show 9 quoted lines
> I simply copied the packfile containing the good copy into the
> corrupted repo, and then ran a "git gc", which "happened" to use the
> good copy of the corrupted object and complete successfully (instead
> of barfing on the bad copy). The GC then removed the old
> (now-obsolete) packfiles, and thus the corruption was gone.
>
> However, exactly _why_ git happened to prefer the good copy in my
> copied packfile instead of the bad copy in the existing packfile, I do
> not know.
By design ;-)
Previous: Johan HerlandNext: Matthieu Moy
Message 5 of 6 in “fsck option to remove corrupt objects - why/why not?”
  1. Ben AvelingOct 16, 2014
  2. Johan HerlandOct 16, 2014
  3. Jeff KingOct 16, 2014
  4. Johan HerlandOct 16, 2014
  5. Junio C HamanoOct 16, 2014
  6. Matthieu MoyOct 16, 2014

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.