libgit2 / libgit2/libgit2sharp

Be more git compliant when resolving references

Open
#498 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Easy fix Up for grabs
Dominant language
C#
Stars
3.5k
Forks
925
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the TagCollection and BranchCollection lookup entry points and trace how reference names are resolved. Reproduce the listed repositories and verify that tag and branch lookups return exactly the references specified for each case.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, git
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.