Re: [1.8.0] Provide proper remote ref namespaces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 7, 2011 at 5:06 PM, Johan Herland <johan@xxxxxxxxxxx> wrote:
> On Monday 07 February 2011, Sverre Rabbelier wrote:
>> On Mon, Feb 7, 2011 at 09:58, Johan Herland <johan@xxxxxxxxxxx> wrote:
>> > This is the same technique we use when talking about branch names:
>> > On this mailing list, nobody is confused when I refer to 'maint',
>> > 'master', 'next' and 'pu'. Still, in our own work repos (at least
>> > in mine), these branches are actually called
>> > "refs/remotes/origin/<name>" (commonly referred to by their
>> > shorthands "origin/<name>"). Here we are, juggling the same kind of
>> > namespaces that I propose for tags, and it seems to work well
>> > without causing much confusion.
>>
>> With the difference that you can't refer to "maint" as just "maint"
>> unless you've created "refs/heads/maint" iff it is unambiguous.
>
> Except that with 'git checkout', you can:
>
> $ git clone git://git.kernel.org/pub/scm/git/git.git
> $ cd git/
> $ git checkout maint

That's some checkout magic kicking in. I cloned and there was only
refs/heads/master. After checkout, refs/heads/maint appeared.

$ git clone git://git.kernel.org/pub/scm/git/git.git git2
$ cd git2
$ git rev-parse maint
maint
fatal: ambiguous argument 'maint': unknown revision or path not in the
working tree.
Use '--' to separate paths from revisions
$ git rev-parse origin/maint
597a63054241c122515c93cbce45bc44eb231f18
$ git co maint
Branch maint set up to track remote branch maint from origin.
Switched to a new branch 'maint'
$ git rev-parse maint
597a63054241c122515c93cbce45bc44eb231f18
-- 
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]