Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gix cannot clone a repo with a branch called HEAD #1428

Closed
LawnGnome opened this issue Jun 26, 2024 · 2 comments · Fixed by #1448
Closed

gix cannot clone a repo with a branch called HEAD #1428

LawnGnome opened this issue Jun 26, 2024 · 2 comments · Fixed by #1448
Labels
acknowledged an issue is accepted as shortcoming to be fixed

Comments

@LawnGnome
Copy link

Current behavior 😯

Attempting to clone a repository that has a branch called HEAD results in this error:

$ gix clone https://github.com/promised-ai/rv
Error: Found 1 issue that prevents the refspec mapping to be used: 
	Conflicting destination "refs/remotes/origin/HEAD" would be written by refs/heads/HEAD ("+refs/heads/*:refs/remotes/origin/*"), HEAD ("HEAD:refs/remotes/origin/HEAD")

(I have absolutely no idea how this happened in that repo in the first place; I'm not affiliated with it in any way. But the branch does exist, according to GitHub.)

Expected behavior 🤔

A clone, presumably.

Git behavior

Git does manage to perform the clone:

$ git clone https://github.com/promised-ai/rv
Cloning into 'rv'...
remote: Enumerating objects: 7170, done.
remote: Counting objects: 100% (1619/1619), done.
remote: Compressing objects: 100% (534/534), done.
remote: Total 7170 (delta 1124), reused 1447 (delta 1032), pack-reused 5551
Receiving objects: 100% (7170/7170), 1.99 MiB | 4.96 MiB/s, done.
Resolving deltas: 100% (5275/5275), done.

Steps to reproduce 🕹

gix clone https://github.com/promised-ai/rv

@Byron Byron added the acknowledged an issue is accepted as shortcoming to be fixed label Jun 27, 2024
@Byron
Copy link
Member

Byron commented Jun 27, 2024

Thanks a lot for reporting!
It looks like this issue even prevents it from attempting any clone at all and clearly should manage to succeed.

I will work on a fix a little later, but hope to get to it towards the end of the week.

@Byron Byron mentioned this issue Jul 9, 2024
3 tasks
@Byron
Copy link
Member

Byron commented Jul 9, 2024

I also realise now how highly unusual this branch is - it doesn't seem to even be possible to accidentally create it with git.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acknowledged an issue is accepted as shortcoming to be fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants