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

Re: A tracking tree for the active work space

From
Jeff King <peff@peff.net>
Date
Mar 11, 2007, 21:40 UTC
Message-ID
<20070311214011.GA21155@coredump.intra.peff.net>
In-Reply-To
<Pine.LNX.4.63.0703112209160.22628@wbgn013.biozentrum.uni-wuerzburg.de>
On Sun, Mar 11, 2007 at 10:31:58PM +0100, Johannes Schindelin wrote:
> - how do you want to cope with regular expressions? (The previous problem 
>   only addresses simple, constant search terms, i.e. no true regular 
>   expressions.)

I expect you could extract any obvious tokens from the regex, and then run the regex only over the files which contain those tokens. Obviously your worst case performance will be the same as the original grep (plus the overhead of looking up the tokens), but in practice, I expect you could end up searching through only a fraction of the files (depending on your regexp and how diverse the data set is).

Of course, I have never had a complaint about the speed of git-grep, so maybe it's not all that compelling. :)

-Peff
Previous: Johannes SchindelinNext: Jon Smirl
Message 5 of 7 in “A tracking tree for the active work space”
  1. Jon SmirlMar 11, 2007
  2. Junio C HamanoMar 11, 2007
  3. Jon SmirlMar 11, 2007
  4. Johannes SchindelinMar 11, 2007
  5. Jeff KingMar 11, 2007
  6. Jon SmirlMar 12, 2007
  7. Johannes SchindelinMar 11, 2007

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.