Re: [Discuss] soften warning message after cloning "void"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 18, 2015 at 4:25 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> On Wed, Feb 18, 2015 at 4:13 PM, Stefan Beller <sbeller@xxxxxxxxxx> wrote:
>>> +               warning(_("remote HEAD refers to nonexistent ref; "
>>> +                         "leaving the current branch unborn.\n"));
>>
>> Personally I find that more confusing, because I have an idea of
>> what checkout may refer to. The notion of an unborn branch is not
>> clear to me.
>> Maybe
>>
>>> -               warning(_("remote HEAD refers to nonexistent ref, "
>>> -                         "unable to checkout.\n"));
>>> +               warning(_("remote HEAD refers to nonexistent ref; "
>>> +                         "Checking out $branch instead.\n"));
>>
>> with $branch being master in the example above. I'd have no idea
>> how to come up with a good heuristic which branch to checkout.
>> (It would need to match current behavior)
>
> Checking out a random branch is absolutely the worst thing you can
> do.

I agree on that, but why did I see the master branch checked out?
(There was just one branch, so it's obvious which to checkout instead)
But HEAD being broken, I would have expected

$ git clone ...
remote HEAD refers to nonexistent ref, checking out nothing
$ git status
HEAD detached at (nothing)



> Personally, I would think that the best thing you can do is to
> educate your users not to clone from a void.

I disagree on that. The repository may be broken by tinkering
(why would you run git -C void symbolic-ref HEAD refs/heads/nosuch
anywazy?) and people want to clone it nevertheless.

> Create some history
> that is worth sharing, and then push into an empty repository.

I am not sure what you mean here.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]