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

Re: [PATCH 0/6] fsck --connectivity-check misses some corruption

From
Jeff King <peff@peff.net>
Date
Jan 16, 2017, 23:26 UTC
Message-ID
<20170116232627.hdzovhho3lnl4kdr@sigill.intra.peff.net>
In-Reply-To
<20170116212231.ojoqzlajpszifaf3@sigill.intra.peff.net>
On Mon, Jan 16, 2017 at 04:22:31PM -0500, Jeff King wrote:
Show 19 quoted lines
> I came across a repository today that was missing an object, and for
> which "git fsck" reported the error but "git fsck --connectivity-check"
> did not. It turns out that the shortcut taken by --connectivity-check
> violates some assumptions made by the rest of fsck (namely, that every
> object in the repo has a "struct object" loaded).
> 
> And fsck being a generally neglected tool, I couldn't help but find
> several more bugs on the way. :)
> 
>   [1/6]: t1450: clean up sub-objects in duplicate-entry test
>   [2/6]: fsck: report trees as dangling
>   [3/6]: fsck: prepare dummy objects for --connectivity-check
>   [4/6]: fsck: tighten error-checks of "git fsck <head>"
>   [5/6]: fsck: do not fallback "git fsck <bogus>" to "git fsck"
>   [6/6]: fsck: check HAS_OBJ more consistently
> 
>  builtin/fsck.c  | 131 ++++++++++++++++++++++++++++++++++++++++++++------------
>  t/t1450-fsck.sh |  70 ++++++++++++++++++++++++++++--
>  2 files changed, 171 insertions(+), 30 deletions(-)

Oh, one thing I forgot to mention: I tried test-merging this with my other recent topic in the area, jk/loose-object-fsck. There are a few conflicts in the test script, but nothing hard to resolve (just both of them adding tests at the end, but both are careful to clean up after themselves).

-Peff
Previous: Junio C Hamano
Message 15 of 15 in “fsck --connectivity-check misses some corruption”
  1. 0/6 fsck --connectivity-check misses some corruptionJeff King, Jan 16, 2017
  2. 1/6 t1450: clean up sub-objects in duplicate-entry testJeff King, Jan 16, 2017
  3. Junio C HamanoJan 17, 2017
  4. Jeff KingJan 17, 2017
  5. 2/6 fsck: report trees as danglingJeff King, Jan 16, 2017
  6. Junio C HamanoJan 17, 2017
  7. 5/6 fsck: do not fallback "git fsck <bogus>" to "git fsck"Jeff King, Jan 16, 2017
  8. 6/6 fsck: check HAS_OBJ more consistentlyJeff King, Jan 16, 2017
  9. 3/6 fsck: prepare dummy objects for --connectivity-checkJeff King, Jan 16, 2017
  10. Junio C HamanoJan 17, 2017
  11. Junio C HamanoJan 17, 2017
  12. Jeff KingJan 17, 2017
  13. 4/6 fsck: tighten error-checks of "git fsck <head>"Jeff King, Jan 16, 2017
  14. Junio C HamanoJan 17, 2017
  15. Jeff KingJan 16, 2017

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.