git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 19, 2015, 00:25 UTC
Message-ID
<CAPc5daUzdiS0HkVbqZvQvSm_49FhQj++hicmDTb717Cd7hg8hA@mail.gmail.com>
In-Reply-To
<CAGZ79kYu1k=iKRWTxVD9Q=C9F5J0d653czeR0NCy04wGobB=Vw@mail.gmail.com>
On Wed, Feb 18, 2015 at 4:13 PM, Stefan Beller <sbeller@google.com> wrote:
Show 16 quoted lines
>> +               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. Personally, I would think that the best thing you can do is to educate your users not to clone from a void. Create some history that is worth sharing, and then push into an empty repository.

Previous: Stefan BellerNext: Shawn Pearce
Message 3 of 9 in “[Discuss] soften warning message after cloning "void"”
  1. Junio C HamanoFeb 18, 2015
  2. Stefan BellerFeb 19, 2015
  3. Junio C HamanoFeb 19, 2015
  4. Shawn PearceFeb 19, 2015
  5. Shawn PearceFeb 19, 2015
  6. Junio C HamanoFeb 19, 2015
  7. Stefan BellerFeb 19, 2015
  8. Junio C HamanoFeb 21, 2015
  9. Stefan BellerFeb 19, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.