All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Stefan Beller <sbeller@google.com>
Cc: Shawn Pearce <spearce@spearce.org>,
	"git\@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: [Discuss] soften warning message after cloning "void"
Date: Fri, 20 Feb 2015 21:58:07 -0800	[thread overview]
Message-ID: <xmqq8ufryff4.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CAGZ79kZAtnhKYQgoA=d-UfQ8LfH4qTxaAFpJRJPSYApD7dwtzg@mail.gmail.com> (Stefan Beller's message of "Wed, 18 Feb 2015 21:12:06 -0800")

Stefan Beller <sbeller@google.com> writes:

> On Wed, Feb 18, 2015 at 6:54 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> On Wed, Feb 18, 2015 at 4:43 PM, Shawn Pearce <spearce@spearce.org> wrote:
>>>
>>> This fails from a JGit server because the ref advertisement for an
>>> empty repository differs and disagrees with the format used by
>>> git-core. The result is a confused client spewing an odd checkout
>>> message.
>>
>> That is exactly why the rephrasing was brought up, wasn't it?
>>
>> As the Subject: line says, this thread is for people who want to
>> help those users with un-odd message, so discuss away
>> and come up with a final applicable patch ;-).
>
> "warning: remote HEAD does not exist, not checking out any branch."
>
> would then be the correct answer.

Technically speaking, that is incorrect because HEAD already points
at 'master'.  We DO check out a 'master' branch.  What is unusual is
that the branch has not been born yet, and that is exactly the same
state after 'git init' created an empty directory.  I.e.

	$ git init new
        $ cd new
        $ git remote add origin $URL
	$ git symbolic-ref HEAD
        refs/heads/master

would be exactly the same place where you are when you see that
message.

What we are not doing is not "not checking out". What we are not
doing is to fast-forwarding the void to any of the branches the
remote has, because we do not know which branch the remote wants
us to start our history from by default.

So, "warning: not starting history of 'master' from any of the
remote's branches, as their HEAD does not point to a valid branch"
or something like that?

  reply	other threads:[~2015-02-21  5:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-18 23:24 [Discuss] soften warning message after cloning "void" Junio C Hamano
2015-02-19  0:13 ` 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 [this message]
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=xmqq8ufryff4.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=sbeller@google.com \
    --cc=spearce@spearce.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.