git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFE] option for find branches in a remote repo which contain a certain commit
       [not found] <CAKkAvazNqZWk=QRmSFsFL33M6z+nZZ_yyxxbxwAh=fQk5DVt-Q@mail.gmail.com>
@ 2012-06-22 14:58 ` ryenus
  2012-06-22 15:24   ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 4+ messages in thread
From: ryenus @ 2012-06-22 14:58 UTC (permalink / raw)
  To: git

Given a certain commit, I want there's a command/option for git to
make it search the remote repo (e.g. origin) and tell me the
branches there which contain that commit.

So that I can pick the wanted branch and fetch it afterward.

The reason I need this is that there are hundreds of (could be more)
branches, but I just need a few of them, and don't want to fetch all
other branches.

I guess this could be an option for git-remote, so that with a given
remote and commit, it returns a list of branches (or even tags).
The list size might default to a number and should be customizable.

Thanks

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

* Re: [RFE] option for find branches in a remote repo which contain a certain commit
  2012-06-22 14:58 ` [RFE] option for find branches in a remote repo which contain a certain commit ryenus
@ 2012-06-22 15:24   ` Ævar Arnfjörð Bjarmason
  2012-06-22 18:14     ` Junio C Hamano
  2012-06-22 18:52     ` Neal Kreitzinger
  0 siblings, 2 replies; 4+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2012-06-22 15:24 UTC (permalink / raw)
  To: ryenus; +Cc: git

On Fri, Jun 22, 2012 at 4:58 PM, ryenus <ryenus@gmail.com> wrote:
> Given a certain commit, I want there's a command/option for git to
> make it search the remote repo (e.g. origin) and tell me the
> branches there which contain that commit.

git branch --contains <commit>
git branch -a --contains <commit>
git tag --contains <commit>

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

* Re: [RFE] option for find branches in a remote repo which contain a certain commit
  2012-06-22 15:24   ` Ævar Arnfjörð Bjarmason
@ 2012-06-22 18:14     ` Junio C Hamano
  2012-06-22 18:52     ` Neal Kreitzinger
  1 sibling, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2012-06-22 18:14 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: ryenus, git

Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:

> On Fri, Jun 22, 2012 at 4:58 PM, ryenus <ryenus@gmail.com> wrote:
>> Given a certain commit, I want there's a command/option for git to
>> make it search the remote repo (e.g. origin) and tell me the
>> branches there which contain that commit.
>
> git branch --contains <commit>
> git branch -a --contains <commit>
> git tag --contains <commit>

Yes and no.  These are all local operations, so you would need to do
a "git clone" before starting to dig history like that.

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

* Re: [RFE] option for find branches in a remote repo which contain a certain commit
  2012-06-22 15:24   ` Ævar Arnfjörð Bjarmason
  2012-06-22 18:14     ` Junio C Hamano
@ 2012-06-22 18:52     ` Neal Kreitzinger
  1 sibling, 0 replies; 4+ messages in thread
From: Neal Kreitzinger @ 2012-06-22 18:52 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: ryenus, git

On 6/22/2012 10:24 AM, Ævar Arnfjörð Bjarmason wrote:
> On Fri, Jun 22, 2012 at 4:58 PM, ryenus <ryenus@gmail.com> wrote:
>> Given a certain commit, I want there's a command/option for git to
>> make it search the remote repo (e.g. origin) and tell me the
>> branches there which contain that commit.
>
> git branch --contains <commit>
> git branch -a --contains <commit>
> git tag --contains <commit>
>

 >> ...The reason I need this is that there are hundreds of...
 >> branches, but I just need a few of them, and don't want to fetch all
 >> other branches...

You could have a 'query repo' that is a local clone of the remote repo.
  Fetch all branches to the local query repo and then use AEvar's
suggested commands.  Once you find the branches you want then you can 
git remote add -t them.

v/r,
neal

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

end of thread, other threads:[~2012-06-22 18:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CAKkAvazNqZWk=QRmSFsFL33M6z+nZZ_yyxxbxwAh=fQk5DVt-Q@mail.gmail.com>
2012-06-22 14:58 ` [RFE] option for find branches in a remote repo which contain a certain commit ryenus
2012-06-22 15:24   ` Ævar Arnfjörð Bjarmason
2012-06-22 18:14     ` Junio C Hamano
2012-06-22 18:52     ` Neal Kreitzinger

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