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

Re: Bug when cloning a repository with a default branch called HEAD

From
Björn Kautler <bjoern@kautler.net>
Date
May 31, 2021, 20:57 UTC
Message-ID
<CAKChYSq__2dgCWVqKt1LeBs9vg8xSj2FnikDqNdgsevfz565zg@mail.gmail.com>
In-Reply-To
<CAKChYSpjOZa2F_mE_7--htzaQ1V4zWgYi8Wm4GHOiYnWoAiswA@mail.gmail.com>

Don't get me wrong, I neither want that nor intended this result. This happened in the test suite of git-spindle which does commands similar to what I showed as reproducer now and I just wondered what is happening.

Imho a simple push should not be able to produce an unusable state and I think this was not the case in the past as the tests used to work. But this could also be caused by changes in the used fixture repo.

Am Mo., 31. Mai 2021 um 22:52 Uhr schrieb Björn Kautler <Bjoern@kautler.net>:
Show 25 quoted lines
>
> Don't get me wrong, I neither want that nor intended this result.
> This happened in the test suite of git-spindle which does commands similar to what I showed as reproducer now and I just wondered what is happening.
>
> Imho a simple push should not be able to produce an unusable state and I think this was not the case in the past as the tests used to work. But this could also be caused by changes in the used fixture repo.
>
> Randall S. Becker <rsbecker@nexbridge.com> schrieb am Mo., 31. Mai 2021, 22:46:
>>
>> >-----Original Message-----
>> >From: <Bjoern@kautler.net>
>> On May 31, 2021 4:38 PM, Björn Kautler wrote:
>> >Subject: Re: Bug when cloning a repository with a default branch called HEAD
>> >It happens the same no matter whether on Windows or Linux.
>> >I now also have a reproduction recipe on how to get into that state.
>> >- Create the `whelk` repository with standard settings, nothing for default branch or anything is necessary
>> >- Execute this: git clone https://github.com/seveas/whelk.git
>> >whelk-src && git -C whelk-src remote add gitlab git@gitlab.com:<your
>> >namespace>/whelk.git && git -C whelk-src push gitlab
>> >refs/remotes/origin/*:refs/heads/* && git clone git@gitlab.com:git-spindle-test-vampire-1/whelk.git && git -C whelk fetch
>>
>> According to GitHub, the default branch for this repo is "main" not "HEAD". AFAIK, HEAD is a reserved ref in git and I don't think this would or should work.
>>
>> Just saying.
>> Randall
>>
Previous: Randall S. Becker
Message 6 of 6 in “Bug when cloning a repository with a default branch called HEAD”
  1. Björn KautlerMay 28, 2021
  2. Bagas SanjayaMay 31, 2021
  3. asymptosisMay 31, 2021
  4. Fwd: Bug when cloning a repository with a default branch called HEADBjörn Kautler, May 31, 2021
  5. Randall S. BeckerMay 31, 2021
  6. Björn KautlerMay 31, 2021

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.