From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Subject: [Discuss] soften warning message after cloning "void"
Date: Wed, 18 Feb 2015 15:24:14 -0800 [thread overview]
Message-ID: <xmqqh9ui2481.fsf@gitster.dls.corp.google.com> (raw)
If you did this:
$ git init void &&
git -C void commit --allow-empty -m initial &&
git -C void symbolic-ref HEAD refs/heads/nosuch
$ git clone --no-local void new
you would get
warning: remote HEAD refers to nonexistent ref, unable to checkout.
While it is correct that we are unable to perform the normal
"checkout" of their primary branch that their HEAD points at,
it was reported that some users find this message unnecessarily
alarming.
Rephrase by saying what we decided to do, instead of only stating
what led us to that decision without telling what that decision is.
That is, "(because we cannot checkout), we left the HEAD pointing at
an unborn branch."
---
builtin/clone.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtin/clone.c b/builtin/clone.c
index 9572467..c7f1bf2 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -625,8 +625,8 @@ static int checkout(void)
head = resolve_refdup("HEAD", RESOLVE_REF_READING, sha1, NULL);
if (!head) {
- warning(_("remote HEAD refers to nonexistent ref, "
- "unable to checkout.\n"));
+ warning(_("remote HEAD refers to nonexistent ref; "
+ "leaving the current branch unborn.\n"));
return 0;
}
if (!strcmp(head, "HEAD")) {
next reply other threads:[~2015-02-18 23:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-18 23:24 Junio C Hamano [this message]
2015-02-19 0:13 ` [Discuss] soften warning message after cloning "void" Stefan Beller
2015-02-19 0:25 ` Junio C Hamano
2015-02-19 0:43 ` Shawn Pearce
2015-02-19 0:46 ` Shawn Pearce
2015-02-19 2:54 ` Junio C Hamano
2015-02-19 5:12 ` Stefan Beller
2015-02-21 5:58 ` Junio C Hamano
2015-02-19 0:47 ` Stefan Beller
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=xmqqh9ui2481.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.