Re: [1.8.0] Provide proper remote ref namespaces
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Feb 7, 2011, 10:22 UTC
- Message-ID
- <AANLkTinmOiiizW6eDkAffpWXP+Xztyv1YJfHp2nfFUZ=@mail.gmail.com>
- In-Reply-To
- <201102071106.17269.johan@herland.net>
On Mon, Feb 7, 2011 at 5:06 PM, Johan Herland <johan@herland.net> wrote:
Show 19 quoted lines
> On Monday 07 February 2011, Sverre Rabbelier wrote: >> On Mon, Feb 7, 2011 at 09:58, Johan Herland <johan@herland.net> 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