Git Mailing List Archive on lore.kernel.org
 help / color / Atom feed
* Feature request: 'git grep' over multiple working trees
@ 2020-03-24  7:49 Ed Avis
  2020-03-24 18:40 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Ed Avis @ 2020-03-24  7:49 UTC (permalink / raw)
  To: git

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-24  7:49 Feature request: 'git grep' over multiple working trees Ed Avis
2020-03-24 18:40 ` Junio C Hamano
2020-03-25  8:04   ` Ed Avis

Git Mailing List Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/git/0 git/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 git git/ https://lore.kernel.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.git


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git