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

Re: [PATCH 2/2] grep: grep cache entries if they are "assume unchanged"

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 27, 2008, 22:39 UTC
Message-ID
<7vy6y1b5ts.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<1230366064-1306-1-git-send-email-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:
> ... External grep case has not been fixed yet. But given that
> on the platform that CE_VALID bit may be used like Windows, external
> grep is not available anyway, I would wait for people to raise their
> hands before touching it.

My gut feeling is that it would suffice to always use the internal grep if there is any index entry with CE_VALID set. Having the bit is an unusual case.

Also I am guessing that your above statement that users on Windows would be the ones who want CE_VALID implies that CE_VALID is for platforms where file operations are slow. If that is really the case, the internal grep might even have performance advantage over external grep.

No, I haven't benched the internal grep recently.
Previous: Nguyễn Thái Ngọc DuyNext: Junio C Hamano
Message 3 of 4 in “grep: grep cache entries if they are "assume unchanged"”
  1. 2/2 grep: grep cache entries if they are "assume unchanged"Nguyễn Thái Ngọc Duy, Dec 27, 2008
  2. 1/2 grep: support --no-ext-grep to test builtin grepNguyễn Thái Ngọc Duy, Dec 27, 2008
  3. Junio C HamanoDec 27, 2008
  4. Junio C HamanoDec 28, 2008

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.