All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: Garbageyard <varuag.chhabra@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Change default branch name (server side) while cloning a repository
Date: Fri, 27 Mar 2015 17:40:51 +0100	[thread overview]
Message-ID: <vpqmw2ytmuk.fsf@anie.imag.fr> (raw)
In-Reply-To: <1427459241861-7627964.post@n2.nabble.com> (Garbageyard's message of "Fri, 27 Mar 2015 05:27:21 -0700 (MST)")

Garbageyard <varuag.chhabra@gmail.com> writes:

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

IIRC, there's a known limitation of the Git protocol which does not
transmit symbolic ref over the network. Only the HEAD's sha1 is
transmitted and the client guesses which branch should be checked out
based on this. But it can guess incorrectly if several branches point to
the same commit.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

  parent reply	other threads:[~2015-03-27 16:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-27 12:27 Change default branch name (server side) while cloning a repository Garbageyard
2015-03-27 14:27 ` Stefan Näwe
2015-03-27 16:47   ` Jeff King
2015-03-27 16:40 ` Matthieu Moy [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-03-29  7:33 Gaurav Chhabra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vpqmw2ytmuk.fsf@anie.imag.fr \
    --to=matthieu.moy@grenoble-inp.fr \
    --cc=git@vger.kernel.org \
    --cc=varuag.chhabra@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.