Skip to content

libgit2 does not parse @~1 correctly #7214

@SeineEloquenz

Description

@SeineEloquenz

Hi, we're using libgit2 v1.9.0 via the Rust bindings, and noticed that refspecs like @~1 are not parsed correctly as the equivalent of HEAD~1 but yield an error. I've also double-checked via pygit2 to make sure it is not a problem in the Rust bindings.

Git handles this alias correctly.
E.g. if I do git reset @~1 the result is the same as git reset HEAD~1, but libgit errors on the same refspec.

Thank you for your time and work on libgit!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions