git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Santi Béjar" <santi@agolina.net>
To: SLONIK.AZ@gmail.com
Cc: "Git Mailing List" <git@vger.kernel.org>
Subject: Re: strange "git clone" behavior wrt an active branch
Date: Sun, 28 Sep 2008 14:37:30 +0200	[thread overview]
Message-ID: <adf1fd3d0809280537k7adffe3dte9579fe70c7f990e@mail.gmail.com> (raw)
In-Reply-To: <ee2a733e0809280505n69f62e0fy89667c175bcc16c@mail.gmail.com>

On Sun, Sep 28, 2008 at 2:05 PM, Leo Razoumov <slonik.az@gmail.com> wrote:
> Hi All,
> I am using the latest stable version git-1.6.0.2.
>
> The man page for git-clone states explicitly that "git clone"
>
> " Clones a repository into a newly created directory, ...[snip]...
>  and creates and checks out an initial branch equal to the
>  cloned repository's currently active branch. "
>
> I noticed that while my active branch "My" happens to point to the
> same commit as the "master" the git clone will check out master
> instead of My (currently active branch). Is it a bug?
>

Currently it is only guessed which is the active branch (with a
preference for the master branch as it is the default), as the current
protocol does not allow tranfering the ref links:

$ git ls-remote $url
$sha1 HEAD
$sha1 $branchname
...

instead of:
ref: refs/heads/master HEAD
$sha1 $branchname
...

So, I think it is a current limitation that maybe should be documented.

HTH,
Santi

  reply	other threads:[~2008-09-28 12:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-28 12:05 strange "git clone" behavior wrt an active branch Leo Razoumov
2008-09-28 12:37 ` Santi Béjar [this message]
2008-09-28 13:23   ` Leo Razoumov
2008-09-28 19:43     ` Santi Béjar

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=adf1fd3d0809280537k7adffe3dte9579fe70c7f990e@mail.gmail.com \
    --to=santi@agolina.net \
    --cc=SLONIK.AZ@gmail.com \
    --cc=git@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).