You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
I would have expected that gix would do so too. But maybe it is not a goal?
gix desperately wants to be fully compatible to git, and this is clearly a shortcoming to be fixed. I didn't think of it, which explains why the code can't handle it.
Note that for testing gix rev parse -e revspec is most helpful as it visualizes the parser callbacks which ultimately drives the resolver.
Duplicates
Current behavior 😯
The function
gix_revision::spec::parse::function::parse
(ingix-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 theparse
function.Expected behavior 🤔
git branch
andgit 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 thatgix
fails in these cases (ingix-revision-tests
, inrefnames.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
The text was updated successfully, but these errors were encountered: