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

Re: [PATCH] git-grep: Add ability to limit directory recursion

From
Aidan Van Dyk <aidan@highrise.ca>
Date
May 7, 2008, 00:47 UTC
Message-ID
<20080507004719.GJ18081@yugib.highrise.ca>
In-Reply-To
<m3iqxr54uy.fsf@localhost.localdomain>
* Jakub Narebski <jnareb@gmail.com> [080506 20:34]:
Show 13 quoted lines
> Aidan Van Dyk <aidan@highrise.ca> writes:
> 
> > This add a -R <limit> option to git-grep which will limit the depth of the
> > directories recursed when git is doing a grep.
> > 
> > This allows you to do something like:
> >         git grep -R 1 <pattern>
> > and see only the results of the grep on files in the current directory.
> > 
> > It defaults to a limit of "0" which disables the limiting.
> 
> Nice idea, although I'm not sure if we shouldn't borrow "-maxdepth"
> option from GNU find and friends...
Good idea - I hadn't thought of that, but I like it better.
a.
-- 
Aidan Van Dyk                                             Create like a god,
aidan@highrise.ca                                       command like a king,
http://www.highrise.ca/                                   work like a slave.
Previous: Jakub NarebskiNext: Jakub Narebski
Message 3 of 4 in “git-grep: Add ability to limit directory recursion”
  1. git-grep: Add ability to limit directory recursionAidan Van Dyk, May 6, 2008
  2. Jakub NarebskiMay 7, 2008
  3. Aidan Van DykMay 7, 2008
  4. Jakub NarebskiMay 7, 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.