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

Re: [RFC] Faster git grep.

From
Jeff King <peff@peff.net>
Date
Jul 25, 2013, 20:08 UTC
Message-ID
<20130725200857.GB1225@sigill.intra.peff.net>
In-Reply-To
<20130725182905.GA7664@domone.kolej.mff.cuni.cz>
On Thu, Jul 25, 2013 at 08:29:05PM +0200, Ondřej Bílka wrote:
> One solution would be to use same trick as was done in google code.
> Build and keep database of trigraphs and which files contain how many of
> them. When querry is made then check
> only these files that have appropriate combination of trigraphs.
That seems like a sensible approach.
> Updating database would be relatively inexpensive compared to disk
> access we need to do anyway.

Yes, I think it can be quite cheap, since you would only need to re-index files that have changed (and git is very quick at telling you what those files are).

> A space usage might be problem so which is why I decided go option
> route.
> 
> Comments, pointers?

I think it is a good idea, but not need to be part of core git. It seems more like you would want to glue together an existing code-indexing solution (like codesearch) with git (which would provide the list of files to index and to search).

If that proves useful in practice, but the interface is clunky for whatever reason, then a good follow-on project could be to build support for updating and using the index via the usual "git grep".

-Peff
Previous: Ondřej BílkaNext: Junio C Hamano
Message 2 of 6 in “[RFC] Faster git grep.”
  1. Ondřej BílkaJul 25, 2013
  2. Jeff KingJul 25, 2013
  3. Junio C HamanoJul 25, 2013
  4. Ondřej BílkaJul 25, 2013
  5. Junio C HamanoJul 26, 2013
  6. Ondřej BílkaJul 26, 2013

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.