libgit2 / libgit2/libgit2sharp
repo.Blame(path) does not accept folders
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 3.5k
- Forks
- 925
- PR merge metrics
- No merged PRs in 30d
Description
Reproduction steps
string relativePath = @"folder\anatherFolder\test.ts"
call repository.Blame(relativePath)
throws exception: "'the path 'folder\anatherFolder\test.ts' does not exist in the given tree"
Expected behavior
accept absolute or relative path
get all Hunks for file in path
Actual behavior
only accepts files in root directory of repository
throws exception: "'the path 'folder\anatherFolder\test.ts' does not exist in the given tree"
Version of LibGit2Sharp (release number or SHA1)
0.25.3
Operating system(s) tested; .NET runtime tested
.NET Core 2.1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the repository.Blame(path) entry point and reproduce the failure using the nested path folder\anatherFolder\test.ts on LibGit2Sharp 0.25.3 with .NET Core 2.1. Trace how the path is resolved, then verify that Blame accepts absolute and relative paths in folders and returns all hunks for the file.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, git
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100