From: "Philip Oakley" <philipoakley@iee.org>
To: "Junio C Hamano" <gitster@pobox.com>,
"Félix Saparelli" <felix@passcod.name>
Cc: <git@vger.kernel.org>
Subject: Re: [Non-Bug] cloning a repository with a default MASTER branch tries to check out the master branch
Date: Wed, 24 May 2017 00:24:52 +0100 [thread overview]
Message-ID: <76BD8B6A1511438B8CCB79C616F3BC5B@PhilipOakley> (raw)
In-Reply-To: xmqqa864mea3.fsf@gitster.mtv.corp.google.com
From: "Junio C Hamano" <gitster@pobox.com>
> Félix Saparelli <felix@passcod.name> 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 can guess, I think.
guessing is rarely a good user experience ;-) however...
>
>> $ git clone git@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), reused 14 (delta 3), pack-reused 0
>> Receiving objects: 100% (14/14), done.
>> Resolving deltas: 100% (3/3), done.
>> warning: remote HEAD refers to nonexistent ref, unable to checkout.
Perhaps here the warning message could include the value of the ref provided
by the remote's HEAD which would then more clearly indicate to the user what
was expected.
I haven't had chance to look at how easy that maybe in the code - perhaps a
bit of low hanging fruit for someone?
>
> So you have MASTER but not master, but your HEAD still is pointing
> at non-existing master. As HEAD is the way the remote tells the
> clone what the default branch to be checked out is, the command
> reports "we cannot do a checkout of the default branch."
>
--
Philip
next prev parent reply other threads:[~2017-05-23 23:25 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 [this message]
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
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=76BD8B6A1511438B8CCB79C616F3BC5B@PhilipOakley \
--to=philipoakley@iee.org \
--cc=felix@passcod.name \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).