From: Junio C Hamano <gitster@pobox.com>
To: "Philip Oakley" <philipoakley@iee.org>
Cc: "Jeff King" <peff@peff.net>,
"Félix Saparelli" <felix@passcod.name>,
git@vger.kernel.org
Subject: Re: [Non-Bug] cloning a repository with a default MASTER branch tries to check out the master branch
Date: Sun, 28 May 2017 08:55:01 +0900 [thread overview]
Message-ID: <xmqqh905c0tm.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <CEF93B59EA3F49608B41892952454B1D@PhilipOakley> (Philip Oakley's message of "Fri, 26 May 2017 21:00:57 +0100")
"Philip Oakley" <philipoakley@iee.org> writes:
> However given the discussion about an unborn HEAD, the option here
> would be to also pass the NULL sha for the symref and then add the
> annotation 'HEAD' after an extra \0, in the same way that an active
> symref could be annotated with the '\0HEAD'. This would kill two birds
> with one stone!
Are you aware of the symref capability that is already advertised in
the initial upload-pack response? Right now, we do so only when
HEAD actually points at something, and the earlier suggestion by
Peff is to do so unconditionally, even when HEAD is dangling.
Existing clients that are symref aware do not do anything (good or
bad) when a HEAD that is dangling [*1*] is advertised, so such a
change will not hurt (but it would not help by itself either).
Ancient clients that are not even aware of the symref are not
affected.
Then new clients _could_ start paying attention to the advertised
HEAD that is dangling.
The bundle transport is a different beast. I do not think it
advertises where HEAD is pointing at, whether it is dangling or
not.
[Footnote]
*1* A HEAD symref that is advertised in the upload-pack response is
dangling when its pointee does not appear in the set of refs
that are advertised. Félix's case would have shown HEAD
pointing at refs/heads/master in the symref capability extension,
but the list of refs and their values would not have included
that ref (there was only refs/heads/MASTER "for joke reasons").
next prev parent reply other threads:[~2017-05-27 23:55 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-22 21:42 [Bug] cloning a repository with a default MASTER branch tries to check out the master branch Félix Saparelli
2017-05-23 3:40 ` [Non-Bug] " Junio C Hamano
2017-05-23 23:24 ` Philip Oakley
2017-05-24 14:19 ` Jeff King
2017-05-25 1:36 ` Junio C Hamano
2017-05-25 3:13 ` Junio C Hamano
2017-05-25 15:59 ` Jeff King
2017-05-25 19:11 ` Jeff King
2017-05-25 23:28 ` Junio C Hamano
2017-05-26 20:00 ` Philip Oakley
2017-05-26 21:17 ` Philip Oakley
2017-05-27 23:55 ` Junio C Hamano [this message]
2017-05-28 11:21 ` Philip Oakley
2017-05-28 12:57 ` Junio C Hamano
2017-05-31 4:43 ` Jeff King
2017-05-23 8:01 ` [Bug] " Samuel Lijin
2017-05-23 12:12 ` Jeff King
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=xmqqh905c0tm.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=felix@passcod.name \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--cc=philipoakley@iee.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 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.