Re: Change default branch name (server side) while cloning a repository

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

 



On Fri, Mar 27, 2015 at 03:27:27PM +0100, Stefan Näwe wrote:

> > If i now clone the repository on my local machine, then the default branch
> > should be pointing to mainline and not master. However, the issue is that it
> > still points to master. Am I /wrong/ in assuming that changing the entry in
> > file HEAD for a given repository on Git server will change the default
> > branch while cloning? If I’m wrong, can anyone please tell me how can I
> > enforce this change on the /server/ side correctly?
> 
> Works for me with  "gitolite3 v3.6.2-24-g8e36230 on git 2.3.4".

It may be related to the version.

Prior to v1.8.4.3, git servers did not communicate the symbolic ref data
to the client. The client guessed it based on which branch had the same
sha1 as HEAD, and if there was ambiguity, it guessed "master" over
others. So it would usually work, but would sometimes have odd results.

In v1.8.4.3, the server started advertising the name of the branch. You
need the client and server both to be that version or more recent for it
to work (otherwise, git falls back to the guessing behavior).

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