Re: remote branches, and branch names in general

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

 



Jeff King, 03.03.2009:
> On Mon, Mar 02, 2009 at 04:38:42PM -0800, Jakub Narebski wrote:
> 
> > > I see the remote branches with names of the form remotes/pub/name where
> > > pub is the nickname of the place I pull from.  To specify such branches,
> > > must I always spell it out with the leading "remotes/", or can that be
> > > shorted or implied somehow?  
> > 
> > You usually can omit "remotes/" prefix, and just use
> > "<remote>/<branch>" (or even "<remote>" for "<remote>/HEAD"). You need
> > it only if there is need for disambiguation.
> 
> Yes. I don't know if they are documented anywhere, but the complete
> lookup order is:
> 
>   $ git grep -h -A8 ref_rev_parse_rules refs.c
>   const char *ref_rev_parse_rules[] = {
>           "%.*s",
>           "refs/%.*s",
>           "refs/tags/%.*s",
>           "refs/heads/%.*s",
>           "refs/remotes/%.*s",
>           "refs/remotes/%.*s/HEAD",
>           NULL
>   };

Documented in git-rev-parse -> specifying revisions.

Markus

--
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]

  Powered by Linux