Re: [PATCH v5 0/3] Cloning with remote unborn HEAD
- From
- Jonathan Tan <jonathantanmy@google.com>
- Date
- Feb 2, 2021, 02:22 UTC
- Message-ID
- <20210202022254.1793991-1-jonathantanmy@google.com>
- In-Reply-To
- <20210130044142.808860-1-jonathantanmy@google.com>
Show 16 quoted lines
> > I really don't care much, but this really needs a corresponding > > documentation update. I.e. something like: > > > > init.defaultBranch:: > > Allows overriding the default branch name e.g. when initializing a > > new repository or when cloning an empty repository. > > > > When cloning a repository over protocol v2 (i.e. ssh://, https://, > > file://, but not a /some/path), and if that repository has > > init.defaultBranch configured, the server will advertise its > > preferred default branch name, and we'll take its configuration over > > ours. > > Thanks - I'll use some of your wording, but I think it's best to leave > open the possibility that cloning using protocol v0 or the disk clone > (/some/path) copies over the current HEAD as well.
Looking back on this, I think that it's natural to think that both an empty repository and a non-empty one have a HEAD that points somewhere, and "git clone" would behave the same way in both cases. So I'll hold off on the documentation change.