gitoxide
gitoxide copied to clipboard
gix cannot clone a repo with a branch called HEAD
trafficstars
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