Git development
 help / color / mirror / Atom feed
* syntax for checking out specific tag on a remote
@ 2007-08-12  1:33 Jon Smirl
  2007-08-12  1:41 ` Junio C Hamano
  0 siblings, 1 reply; 5+ messages in thread
From: Jon Smirl @ 2007-08-12  1:33 UTC (permalink / raw)
  To: Git Mailing List

What's the syntax for checking out a specific tag on a remote?

I tried:
git checkout -b my19 linus/master/v2.6.19
git checkout linus/master/v2.6.19
git checkout linus/v2.6.19

jonsmirl@terra:/home/linux$ git remote show linus
* remote linus
  URL: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git


-- 
Jon Smirl
jonsmirl@gmail.com

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

* Re: syntax for checking out specific tag on a remote
  2007-08-12  1:33 syntax for checking out specific tag on a remote Jon Smirl
@ 2007-08-12  1:41 ` Junio C Hamano
  2007-08-12  1:50   ` Jon Smirl
  0 siblings, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2007-08-12  1:41 UTC (permalink / raw)
  To: Jon Smirl; +Cc: Git Mailing List

"Jon Smirl" <jonsmirl@gmail.com> writes:

> What's the syntax for checking out a specific tag on a remote?

This depends on where you stored the tags you obtained from the
remote.  By default, "git fetch --tags" would store the tags in
a flat namespace; there is no "remote tag" namespace.

Hence you would say:

	git checkout v2.6.19

to get a detached HEAD at v2.6.19, or if you want to start a
branch from there,

	git checkout -b my19 v2.6.19

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

* Re: syntax for checking out specific tag on a remote
  2007-08-12  1:41 ` Junio C Hamano
@ 2007-08-12  1:50   ` Jon Smirl
  2007-08-12  1:57     ` Jon Smirl
  2007-08-12  2:01     ` Junio C Hamano
  0 siblings, 2 replies; 5+ messages in thread
From: Jon Smirl @ 2007-08-12  1:50 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Git Mailing List

On 8/11/07, Junio C Hamano <gitster@pobox.com> wrote:
> "Jon Smirl" <jonsmirl@gmail.com> writes:
>
> > What's the syntax for checking out a specific tag on a remote?
>
> This depends on where you stored the tags you obtained from the
> remote.  By default, "git fetch --tags" would store the tags in
> a flat namespace; there is no "remote tag" namespace.

I've been storing unrelated trees in the same git db. It never
occurred to me that there was a single tag name space. So if two of my
remotes both make a tag TEST then last one fetched will win? Are
"remote tag" namespaces planned for the future?


>
> Hence you would say:
>
>         git checkout v2.6.19
>
> to get a detached HEAD at v2.6.19, or if you want to start a
> branch from there,
>
>         git checkout -b my19 v2.6.19
>
>


-- 
Jon Smirl
jonsmirl@gmail.com

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

* Re: syntax for checking out specific tag on a remote
  2007-08-12  1:50   ` Jon Smirl
@ 2007-08-12  1:57     ` Jon Smirl
  2007-08-12  2:01     ` Junio C Hamano
  1 sibling, 0 replies; 5+ messages in thread
From: Jon Smirl @ 2007-08-12  1:57 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Git Mailing List

On 8/11/07, Jon Smirl <jonsmirl@gmail.com> wrote:
> On 8/11/07, Junio C Hamano <gitster@pobox.com> wrote:
> > "Jon Smirl" <jonsmirl@gmail.com> writes:
> >
> > > What's the syntax for checking out a specific tag on a remote?
> >
> > This depends on where you stored the tags you obtained from the
> > remote.  By default, "git fetch --tags" would store the tags in
> > a flat namespace; there is no "remote tag" namespace.
>
> I've been storing unrelated trees in the same git db. It never
> occurred to me that there was a single tag name space. So if two of my
> remotes both make a tag TEST then last one fetched will win? Are
> "remote tag" namespaces planned for the future?

This seems inconsistent to me. Remote heads have their own namespace
but remote tags don't.

-- 
Jon Smirl
jonsmirl@gmail.com

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

* Re: syntax for checking out specific tag on a remote
  2007-08-12  1:50   ` Jon Smirl
  2007-08-12  1:57     ` Jon Smirl
@ 2007-08-12  2:01     ` Junio C Hamano
  1 sibling, 0 replies; 5+ messages in thread
From: Junio C Hamano @ 2007-08-12  2:01 UTC (permalink / raw)
  To: Jon Smirl; +Cc: Junio C Hamano, Git Mailing List

"Jon Smirl" <jonsmirl@gmail.com> writes:

> On 8/11/07, Junio C Hamano <gitster@pobox.com> wrote:
>> "Jon Smirl" <jonsmirl@gmail.com> writes:
>>
>> > What's the syntax for checking out a specific tag on a remote?
>>
>> This depends on where you stored the tags you obtained from the
>> remote.  By default, "git fetch --tags" would store the tags in
>> a flat namespace; there is no "remote tag" namespace.
>
> I've been storing unrelated trees in the same git db. It never
> occurred to me that there was a single tag name space. So if two of my
> remotes both make a tag TEST then last one fetched will win? Are
> "remote tag" namespaces planned for the future?

There actually is no need to plan anything.

Typically people do not publish "private" tags to require such a
layout to differentiate tags from 47 different sources, so we
have never talked about this, but you can look into .git/config
file in your repository, and adjust [remote "foo"] fetch lines
to your specific taste.  e.g.

	[remote "a"]
        	fetch = +refs/heads/*:refs/remotes/a/*
                fetch = +refs/tags/*:refs/remote-tags/a/*

	[remote "b"]
        	fetch = +refs/heads/*:refs/remotes/b/*
                fetch = +refs/tags/*:refs/remote-tags/b/*

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

end of thread, other threads:[~2007-08-12  2:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-12  1:33 syntax for checking out specific tag on a remote Jon Smirl
2007-08-12  1:41 ` Junio C Hamano
2007-08-12  1:50   ` Jon Smirl
2007-08-12  1:57     ` Jon Smirl
2007-08-12  2:01     ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox