Description
Duplicates
- I have searched the existing issues
Current behavior 😯
The function gix_revision::spec::parse::function::parse
(in gix-revision/src/spec/parse/function.rs
does not support revision which contains the character @
.
For instance, at work, we have the guidelines to prefix our branches names by our handle, so my branch looks like lthms@fix-something
.
I’ve run into the issue because I am using Stacked Git, which has moved from its previous git library to gitoxide
(see stacked-git/stgit#306). Since I’ve upgraded, I get errors related to branch names with @
, and after some digging, I was able to isolate the parse
function.
Expected behavior 🤔
git branch
and git rev-parse
handle branches with @
in their name gracefully.
I would have expected that gix
would do so too. But maybe it is not a goal? I’ve seen that there are tests explicitely checking that gix
fails in these cases (in gix-revision-tests
, in refnames.rs
).
I am trying to get my head around the code, but so far it’s a bit hard to follow. Any help is welcome.
Steps to reproduce 🕹
git branch a@b
cargo run rev resolve a@b
Result is
Error: The ref partially named "a" could not be found