From: Shawn Pearce <spearce@spearce.org>
To: Jeffrey Middleton <jefromi@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: remote's HEAD not detected correctly
Date: Mon, 28 Feb 2011 13:01:08 -0800 [thread overview]
Message-ID: <AANLkTimqTa24QSWACFX9GErt-Tn+wLda1s_AvH7dzEpm@mail.gmail.com> (raw)
In-Reply-To: <AANLkTimWieViK4JcJQuTDiRiAdyvHuwkwy8fL+XUV+i-@mail.gmail.com>
On Mon, Feb 28, 2011 at 12:52, Jeffrey Middleton <jefromi@gmail.com> wrote:
>
> So somehow, the clone misses the fact that origin's HEAD is pu, not
> master, and git remote is only partially aware of this. It looks like
> this only happens when the two branches in question are pointing to
> the same commit; perhaps git is trying to guess what HEAD is via the
> SHA1? I know that ls-remote prints an SHA1, not a refname, for HEAD -
> is it not actually possible to get that information through a general
> transport protocol?
Right. The transport protocol doesn't expose the name that a symbolic
reference points to, only its current value. Thus clients are forced
to guess by looking for another reference whose current SHA-1 is the
same. If there is more than one, its taking a best guess.
There have been a few attempts to expand the protocol and include the
current symbolic reference target name, but thus far it hasn't gotten
much beyond the idea stage.
--
Shawn.
next prev parent reply other threads:[~2011-02-28 21:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-28 20:52 remote's HEAD not detected correctly Jeffrey Middleton
2011-02-28 21:01 ` Shawn Pearce [this message]
2011-02-28 21:42 ` Jeff King
2011-02-28 23:10 ` Junio C Hamano
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=AANLkTimqTa24QSWACFX9GErt-Tn+wLda1s_AvH7dzEpm@mail.gmail.com \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=jefromi@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 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).