surf: Add a small explainer on binary detection in diffs

Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
This commit is contained in:
Sebastian Martinez
2023-09-25 11:36:46 +02:00
parent 80ac22a7e2
commit c4590eca2d
+10
View File
@@ -496,6 +496,16 @@ impl Repository {
}
}
/// Create a diff with the difference between two tree objects.
///
/// Defines some options and flags that are passed to git2.
///
/// Note:
/// libgit2 optimizes around not loading the content when there's no content
/// callbacks configured. Be aware that binaries aren't detected as
/// expected.
///
/// Reference: <https://github.com/libgit2/libgit2/issues/6637>
fn diff_commits(
&self,
path: Option<&Path>,