mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <>
To: Ivan Chernyavsky <>
Subject: Which branch(es) contain certain commits? (was Re: (unknown))
Date: Wed, 05 Aug 2015 10:03:41 -0700	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <> (Ivan Chernyavsky's message of "Wed, 05 Aug 2015 15:47:25 +0300")

Ivan Chernyavsky <> writes:

> For some time I'm wondering why there's no "--grep" option to the "git
> branch" command, which would request to print only branches having
> specified string/regexp in their history.
> So for example:
>     $ git branch -r --grep=BUG12345
> should be roughly equivalent to following expression I'm using now for the same task:
>     $ for r in `git rev-list --grep=BUG12345 --remotes=origin`; do git
> branch -r --list --contains=$r 'origin/*'; done | sort -u
> Am I missing something, is there some smarter/simpler way to do this?

I think people do things like:

    git log --all --decorate --grep=...

  reply	other threads:[~2015-08-05 17:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-05 12:47 (unknown) Ivan Chernyavsky
2015-08-05 17:03 ` Junio C Hamano [this message]
2015-08-05 17:05   ` Which branch(es) contain certain commits? (was Re: (unknown)) Junio C Hamano
2015-08-05 19:48     ` Ivan Chernyavsky
2015-08-15  9:19 ` Duy Nguyen
2015-08-17  6:45   ` Which branch(es) contain certain commits? (was Re: (unknown)) Ivan Chernyavsky
2015-08-17 17:49   ` Junio C Hamano
2015-08-21 21:29     ` Which branch(es) contain certain commits? (was Re: (unknown)) Ivan Chernyavsky
2015-08-21 22:39       ` Junio C Hamano
2015-08-22  9:19         ` Ivan Chernyavsky
2015-08-22 10:32           ` Ivan Chernyavsky
2015-08-22 10:59           ` Karthik Nayak

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:

  List information:

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

  git send-email \ \ \ \ \

* 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

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).