Thread (3 messages) flat view 3 messages, 3 authors, 2017-05-31

Re: [Non-Bug] cloning a repository with a default MASTER branch tries to check out the master branch

From: Junio C Hamano <hidden>
Date: 2017-05-27 23:55:12

"Philip Oakley" [off-list ref] 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").
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help