Skip to content

Be more git compliant when resolving references #498

Open
@nulltoken

Description

@nulltoken

It looks like LibGit2Sharp is not that git.git compliant when it comes to weirdly named references. Let's fix this!

Given a repo with a tag refs/tags/refs/tags/v1.0

  • TagCollection["v1.0"] shouldn't resolve anything
  • TagCollection["refs/tags/v1.0"] should correctly resolve it
  • TagCollection["refs/tags/refs/tags/v1.0"] should correctly resolve it

Given a repo with two tags refs/tags/refs/tags/v1.0 and refs/tags/v1.0

  • TagCollection["v1.0"] should resolve refs/tags/v1.0
  • TagCollection["refs/tags/v1.0"] should resolve refs/tags/v1.0
  • TagCollection["refs/tags/refs/tags/v1.0"] should resolve refs/tags/refs/tags/v1.0

It would make sense to make BranchCollection consistent with this behavior as well.

Given a repo with a tag refs/tags/v1.0 and a branch refs/heads/v1.0

  • TagCollection["v1.0"] should resolve refs/tags/v1.0
  • BranchCollection["v1.0"] should resolve refs/heads/v1.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions