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

Re: [PATCH] fix overslow :/no-such-string-ever-existed diagnostics

From
Junio C Hamano <gitster@pobox.com>
Date
May 10, 2011, 23:11 UTC
Message-ID
<7v4o52i21x.fsf@alter.siamese.dyndns.org>
In-Reply-To
<vpqfwomffuy.fsf@bauges.imag.fr>
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
> Is this a complement or an alternative? It seems to me that your other
> patch makes this first one useless (in the sense that the second call is
> always cheap), and avoids complexifying the code of get_sha1_with_mode_1
> for the first call.

I think that the get_sha1_with_mode_1() that is sprinkled with the "gently" conditional everywhere _is_ the primary source of complexity.

I suspect that if 009fee4 did a proper refactoring, get_sha1_with_mode() wouldn't have that "gently" option at all, and the die_verify_filename() wouldn't call get_sha1_with_mode(). Instead, they would share same set of helper functions and the latter would make a few calls to them, only to deal with :<path> and <tree>:<path> cases.

Previous: Matthieu Moy
Message 5 of 5 in “fix overstrict :<path> diagnosis”
  1. fix overstrict :<path> diagnosisJunio C Hamano, May 10, 2011
  2. fix overslow :/no-such-string-ever-existed diagnosticsJunio C Hamano, May 10, 2011
  3. Re* [PATCH] fix overslow :/no-such-string-ever-existed diagnosticsJunio C Hamano, May 10, 2011
  4. Matthieu MoyMay 10, 2011
  5. Junio C HamanoMay 10, 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.