libgit2 / libgit2/libgit2sharp

repo.Blame(path) does not accept folders

Open
#1,625 1 comment 0 reactions 0 assignees View on GitHub

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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.