title: How to apply diff rules of the languages in gitattributes
body: <p>For example, the <code>.gitattributes</code> file of <code>lg2s</code> has the line <code>*.cs     diff=csharp</code>. the output of the codes</p>
  
  <pre><code>using (var repo = new Repository(@"path\to\lg2s"))
  {
      var tree1 = repo.Lookup&lt;Commit&gt;("a845db9").Tree;
      var tree2 = repo.Lookup&lt;Commit&gt;("d677741").Tree;
      var patches = repo.Diff.Compare&lt;Patch&gt;(tree1, tree2);
      foreach (var patch in patches)
      {
          Console.WriteLine(patch.Patch);
      }
  }
  </code></pre>
  
  <p>is (shortly)</p>
  
  <pre><code>diff --git a/LibGit2Sharp/RepositoryStatus.cs b/LibGit2Sharp/RepositoryStatus.cs
  @@ -59,8 +59,8 @@ namespace LibGit2Sharp
  </code></pre>
  
  <p>but the output of <code>git bash</code> is (shortly)</p>
  
  <pre><code>diff --git a/LibGit2Sharp/RepositoryStatus.cs b/LibGit2Sharp/RepositoryStatus.cs
  @@ -59,8 +59,8 @@ internal RepositoryStatus(Repository repo, StatusOptions optio
  </code></pre>
  
  <p>the second line not same.</p>
  
  <p>Looks like there are an in-depth discussion <code>Add .gitattributes support</code> <a href="http://github.com/libgit2/libgit2/issues/508" rel="nofollow">libgit2/#508</a>, but the PR <code>Add APIs for git attributes</code> <a href="http://github.com/libgit2/libgit2/pull/516" rel="nofollow">libgit2/#516</a> is merged or not?</p>
  
  <p>How many languages were supported now?</p>
  
  <p>Can we specify the rules without <code>gitattributes</code> file?</p>