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

Feature request: 'git grep' over multiple working trees

From
EAEd Avis <ed.avis@qmaw.com>
Date
Mar 24, 2020, 07:49 UTC
Message-ID
<MN2PR11MB3663C042590097D7A7F4B2409DF10@MN2PR11MB3663.namprd11.prod.outlook.com>
If the current directory contains several git working trees (each in its own subdirectory) then 'git grep' should search all of them.  It would be roughly equivalent to
% for i in * ; do (cd $i ; git grep whatever); done
except that the filenames listed would have the full path.

As you see it's fairly simple to script up, and there are tools to do it (one called 'multi'), but having it built in to 'git grep' would be handy. If the current directory doesn't contain any git working trees, then 'git grep' can die as it does now. If there are some working trees and some random other stuff, it can warn and skip the other stuff.

Please ignore confidentiality stuff after this point.
Next: Junio C Hamano
Message 1 of 3 in “Feature request: 'git grep' over multiple working trees”
  1. Ed AvisMar 24, 2020
  2. Junio C HamanoMar 24, 2020
  3. Ed AvisMar 25, 2020

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.