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

Re: [PATCH v2 1/2] read-cache: skip index SHA verification

From
Jeff King <peff@peff.net>
Date
Mar 27, 2017, 23:39 UTC
Message-ID
<20170327233953.7si3eex2y46hxpap@sigill.intra.peff.net>
In-Reply-To
<20170327233210.GO31294@aiede.mtv.corp.google.com>
On Mon, Mar 27, 2017 at 04:32:10PM -0700, Jonathan Nieder wrote:
Show 21 quoted lines
> Jeff King wrote:
> 
> > Hrm, there shouldn't be any dependency of the config on the index (and
> > there are a handful of options which impact the index already). Did you
> > try it and run into problems?
> >
> > In general, I'd much rather see us either:
> >
> >   1. Rip the code out entirely if it is not meant to be configurable,
> >      and cannot be triggered by the actual git binary.
> >
> > or
> >
> >   2. Make it configurable, even if most people wouldn't use it. And then
> >      have a test to exercise it using a git command (unlike the one-off
> >      test helper, which isn't run at all).
> 
> Agreed with this, leaning toward (1).
> 
> If "git fsck" verifies the .git/index file then I don't see any need
> for other commands to.

Yeah, code that _can_ be run but almost nobody does is possibly worse than code that can't be run. :)

I agree that it would make sense for fsck to check it, though (just like it checks the actual pack trailer checksums, even though normal operations do not).

-Peff
Previous: Jonathan NiederNext: Jeff Hostetler
Message 5 of 10 in “read-cache: call verify_hdr() in a background thread”
  1. 0/2 read-cache: call verify_hdr() in a background threadgit@jeffhostetler.com, Mar 27, 2017
  2. 1/2 read-cache: skip index SHA verificationgit@jeffhostetler.com, Mar 27, 2017
  3. Jeff KingMar 27, 2017
  4. Jonathan NiederMar 27, 2017
  5. Jeff KingMar 27, 2017
  6. Jeff HostetlerMar 28, 2017
  7. Jeff KingMar 28, 2017
  8. 2/2 skip_verify_index: helper testgit@jeffhostetler.com, Mar 27, 2017
  9. Jeff KingMar 27, 2017
  10. Jeff HostetlerMar 28, 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.