git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Ed Avis <ed.avis@qmaw.com>
To: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Feature request: 'git grep' over multiple working trees
Date: Tue, 24 Mar 2020 07:49:13 +0000	[thread overview]
Message-ID: <MN2PR11MB3663C042590097D7A7F4B2409DF10@MN2PR11MB3663.namprd11.prod.outlook.com> (raw)

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.

             reply	other threads:[~2020-03-24  7:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-24  7:49 Ed Avis [this message]
2020-03-24 18:40 ` Feature request: 'git grep' over multiple working trees Junio C Hamano
2020-03-25  8:04   ` Ed Avis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MN2PR11MB3663C042590097D7A7F4B2409DF10@MN2PR11MB3663.namprd11.prod.outlook.com \
    --to=ed.avis@qmaw.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).