JYL*_*JYL 7 c# git libgit2 libgit2sharp git-blame
我需要以编程方式使用C#获取Git历史记录中特定行的最后一位作者.我尝试使用libgit2sharp:
var repo = new LibGit2Sharp.Repository(gitRepositoryPath);
string relativePath = MakeRelativeSimple(filename);
var blameHunks = repo.Blame(relativePath);
// next : find the hunk which overlap the desired line number
Run Code Online (Sandbox Code Playgroud)
但这相当于命令
git blame <file>
事实上我需要
git blame -w <file> (比较时忽略空格)
Libgit2sharp不设置-w开关,也不提供任何参数/选项来设置它.我有什么选择?你知道其他任何与命令-w切换兼容的库blame吗?