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

Re: Finding all branches(remote and local) include given commit?

From
Carlos Martín Nieto <cmn@elego.de>
Date
May 12, 2012, 12:48 UTC
Message-ID
<1336826919.3002.18.camel@centaur.lab.cmartin.tk>
In-Reply-To
<CAFT+Tg-cYCatcaP3fR7X7+GnpazUb3ys96A5AP6HTjvD_=+UyQ@mail.gmail.com>
On Sat, 2012-05-12 at 21:25 +0900, Yi, EungJun wrote:
Show 10 quoted lines
> Wow, I should do like this:
> 
> $ git branch -a --contains 499e7b31509cfbb59dcb2a046f8e2fd1a3e73d6f
> * master
>   remotes/origin/HEAD -> origin/master
>   remotes/origin/master
>   remotes/origin/next
>   remotes/origin/pu
> 
> git-branch has '-a' but not '-all', and git-remote has '--all' but not '-a'.
The branch command has had long-form since 1.7.8
Show 34 quoted lines
> 
> This is a bit confusing for me. Why don't the two commands have the
> option under the same name?
> 
> 
> 2012/5/12 Carlos Martín Nieto <cmn@elego.de>:
> > On Sat, 2012-05-12 at 20:42 +0900, Yi, EungJun wrote:
> >> Is there any way to find remote and local branches include given commit?
> >>
> >> e.g.
> >>
> >> $ git branch --all --contains 499e7b31509cfbb59dcb2a046f8e2fd1a3e73d6f
> >> * master
> >>   remotes/origin/next
> >>
> >> As you know, it does not work and "git branch --contains" finds only
> >> local branches.
> >
> > Works For Me. What version are you trying it with? Are you sure that
> > remote-tracking branches do contain that commit?
> >
> > From a quick look through the log and release notes, it was never
> > mentioned as a fix. The log contains 3f7701a4 from 2007 which fixes 'git
> > describe --all --contains' which, though unlikely, might be related.
> > This commit was however part of release 1.5.4, which makes it unlikely
> > you'd be using something older.
> >
> >   cmn
> >
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
Previous: Yi, EungJunNext: Yi, EungJun
Message 5 of 6 in “Finding all branches(remote and local) include given commit?”
  1. Yi, EungJunMay 12, 2012
  2. Carlos Martín NietoMay 12, 2012
  3. Yi, EungJunMay 12, 2012
  4. Yi, EungJunMay 12, 2012
  5. Carlos Martín NietoMay 12, 2012
  6. Yi, EungJunMay 12, 2012

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.