How to apply diff rules of the languages in gitattributes
问题 For example, the .gitattributes file of lg2s has the line *.cs diff=csharp . the output of the codes using (var repo = new Repository(@"path\to\lg2s")) { var tree1 = repo.Lookup<Commit>("a845db9").Tree; var tree2 = repo.Lookup<Commit>("d677741").Tree; var patches = repo.Diff.Compare<Patch>(tree1, tree2); foreach (var patch in patches) { Console.WriteLine(patch.Patch); } } is (shortly) diff --git a/LibGit2Sharp/RepositoryStatus.cs b/LibGit2Sharp/RepositoryStatus.cs @@ -59,8 +59,8 @@ namespace