From: Junio C Hamano <gitster@pobox.com>
To: Ivan Chernyavsky <camposer@yandex.ru>
Cc: git@vger.kernel.org
Subject: Which branch(es) contain certain commits? (was Re: (unknown))
Date: Wed, 05 Aug 2015 10:03:41 -0700 [thread overview]
Message-ID: <xmqqmvy54qhe.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <349031438778845@web22j.yandex.ru> (Ivan Chernyavsky's message of "Wed, 05 Aug 2015 15:47:25 +0300")
Ivan Chernyavsky <camposer@yandex.ru> 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=...
next prev parent 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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqmvy54qhe.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=camposer@yandex.ru \
--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.
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 NNTP newsgroup(s).