Re: [PATCH] Disable USE_SYMLINK_HEAD by default
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:12
Pavel Roskin [off-list ref] writes:
On Tue, 2005-11-15 at 09:05 -0800, Junio C Hamano wrote:quoted
Petr Baudis [off-list ref] writes:quoted
Yes, I would very much like to have this. I still want to go symrefs-only for public repositories created for cg-admin-setuprepo, so that fetching over HTTP works properly.Sorry, I must have missed that part. How does fetch-over-HTTP break with symlinked HEAD?With symlinks, cogito doesn't know which branch it is fetching if the branch is not explicitly specified.
Ah, thanks.
git-clone-pack has the same problem. It basically "guesses" by:
- If the master branch exists, and the object name of
the branch tip matches the object name of HEAD, assume
HEAD points at master. Even when there are other
branches that happen to share the same branch head.
- Otherwise, if there is a branch whose tip matches the
object name of HEAD, assume HEAD points at it. It
just picks "one-of-them" if more than one branches
match.
- If there is no branch that matches HEAD, issue a
warning and create HEAD that records the object name,
not pointing anywhere.
To solve this generally we would need to extend what ls-remote
returns, I suppose.