libgit2 / libgit2/libgit2sharp
Some file can't be tracked by Commits.QueryBy(path)
Open
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 3.5k
- Forks
- 925
- PR merge metrics
- No merged PRs in 30d
Description
I use to following code to track the latest change for a special file. But I found some file can't be tracked while the others can be tracked correctly.
var latestCommitLog = repository.Commits.QueryBy(file);
if (latestCommitLog.Count() > 0)
{
var latestCommit = latestCommitLog.First().Commit;
}
else
{
// no history
// some file has be pushed to repository but can't be tracked.
}
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
The issue only identifies repository.Commits.QueryBy(file); first reproduce it with a tracked file that works and one that does not, recording their path details and repository state. Trace that API call to determine why the result is empty. Done means the failing file returns its latest commit, with a regression test covering the case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, git
- Domain
- api, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100