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

2017-05-30 Thread Jeff King
On Sun, May 28, 2017 at 12:21:50PM +0100, Philip Oakley wrote: > > 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

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

2017-05-28 Thread Junio C Hamano
"Philip Oakley" writes: > From: "Junio C Hamano" >> "Philip Oakley" 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 >>>

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

2017-05-28 Thread Philip Oakley
From: "Junio C Hamano" "Philip Oakley" 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

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

2017-05-27 Thread Junio C Hamano
"Philip Oakley" 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

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

2017-05-26 Thread Philip Oakley
adding and updating an example.. From: "Philip Oakley" been trying to keep up... From: "Jeff King" On Thu, May 25, 2017 at 11:59:24AM -0400, Jeff King wrote: The just-HEAD case could look like: This patch does work, in the sense that upload-pack

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

2017-05-26 Thread Philip Oakley
been trying to keep up... From: "Jeff King" On Thu, May 25, 2017 at 11:59:24AM -0400, Jeff King wrote: The just-HEAD case could look like: This patch does work, in the sense that upload-pack advertises the unborn HEAD symref. But the client doesn't actually do anything with

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

2017-05-25 Thread Junio C Hamano
Jeff King writes: > I dunno. I was thinking there might be a quick tweak, but I'm wondering > if this arcane case is worth the restructuring we'd have to do to > support it. It only comes up when you've moved the server repo's HEAD to > an unborn branch _and_ you have other refs

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

2017-05-25 Thread Jeff King
On Thu, May 25, 2017 at 11:59:24AM -0400, Jeff King wrote: > The just-HEAD case could look like: This patch does work, in the sense that upload-pack advertises the unborn HEAD symref. But the client doesn't actually do anything with it. The capability parsing happens in get_remote_heads(), which

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

2017-05-25 Thread Jeff King
On Thu, May 25, 2017 at 12:13:03PM +0900, Junio C Hamano wrote: > >> So if we wanted to improve this, I think the first step would be for the > >> server to start sending symref lines for HEAD, even when it does not > >> resolve to anything. > > > > Yup, noticed the same and I agree with your

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

2017-05-24 Thread Junio C Hamano
Junio C Hamano writes: > Jeff King writes: > >> Unfortunately, it can't, because the ref doesn't exist: >> >> $ git ls-remote git://github.com/passcod/UPPERCASE-NPM.git >> efc7dbfd6ca155d5d19ce67eb98603896062f35a refs/heads/MASTER >>

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

2017-05-24 Thread Junio C Hamano
Jeff King writes: > Unfortunately, it can't, because the ref doesn't exist: > > $ git ls-remote git://github.com/passcod/UPPERCASE-NPM.git > efc7dbfd6ca155d5d19ce67eb98603896062f35arefs/heads/MASTER > e60ea8e6ec45ec45ff44ac8939cb4105b16477darefs/pull/1/head >

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

2017-05-24 Thread Jeff King
On Wed, May 24, 2017 at 12:24:52AM +0100, Philip Oakley wrote: > > > $ git clone g...@github.com:passcod/UPPERCASE-NPM.git > > > Cloning into 'UPPERCASE-NPM'... > > > remote: Counting objects: 14, done. > > > remote: Compressing objects: 100% (11/11), done. > > > remote: Total 14 (delta 3),

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

2017-05-23 Thread Philip Oakley
From: "Junio C Hamano" Félix Saparelli writes: I created a git repository that, for joke reasons, has a single branch called MASTER (in uppercase). Upon cloning this repo, git attempts to checkout the master branch (in lowercase), which does not exist.

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

2017-05-23 Thread Jeff King
On Tue, May 23, 2017 at 04:01:06AM -0400, Samuel Lijin wrote: > For some reason the repo on GH does not have a HEAD pointer: > > $ git ls-remote https://github.com/passcod/UPPERCASE-NPM.git > efc7dbfd6ca155d5d19ce67eb98603896062f35arefs/heads/MASTER >

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

2017-05-23 Thread Samuel Lijin
For some reason the repo on GH does not have a HEAD pointer: $ git ls-remote https://github.com/passcod/UPPERCASE-NPM.git efc7dbfd6ca155d5d19ce67eb98603896062f35arefs/heads/MASTER e60ea8e6ec45ec45ff44ac8939cb4105b16477darefs/pull/1/head f35a73dcb151d336dc3d30c9a2c7423ecdb7bd1c

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

2017-05-22 Thread Junio C Hamano
Félix Saparelli writes: > I created a git repository that, for joke reasons, has a single branch > called MASTER (in uppercase). Upon cloning this repo, git attempts to > checkout the master branch (in lowercase), which does not exist. See what Git told you carefully and you

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

2017-05-22 Thread Félix Saparelli
Hi, I created a git repository that, for joke reasons, has a single branch called MASTER (in uppercase). Upon cloning this repo, git attempts to checkout the master branch (in lowercase), which does not exist. Checking out the MASTER branch manually afterwards works. $ git clone