surf: Improve diff binary detection
Iterates over the git2::Diff entries to force libgit2 to do the binary detection.
Also toggles the skip_binary_check in the DiffOptions.
All this to workaround the libgit2 lazy flag setting1
1
https://github.com/libgit2/libgit2/issues/6637
2 files changed
+21
-18
15255f22
→
ea76596f
modified radicle-surf/src/diff/git.rs
@@ -236,6 +236,10 @@ impl<'a> TryFrom<git2::Diff<'a>> for Diff {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -268,10 +272,10 @@ fn created(
|
|
|
|
|
|
| - | |
| - | |
| - | |
| + | |
|
|
| + | |
| + | |
|
|
|
|
|
@@ -293,10 +297,10 @@ fn deleted(
|
|
|
|
|
|
| - | |
| - | |
| - | |
| + | |
|
|
| + | |
| + | |
|
|
|
|
|
@@ -318,12 +322,12 @@ fn modified(
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| + | |
|
|
|
|
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -349,10 +353,10 @@ fn renamed(
|
|
|
|
|
|
| - | |
| - | |
| - | |
| + | |
|
|
| + | |
| + | |
|
|
|
|
|
@@ -379,10 +383,10 @@ fn copied(
|
|
|
|
|
|
| - | |
| - | |
| - | |
| + | |
|
|
| + | |
| + | |
|
|
|
|
|
modified radicle-surf/src/repo.rs
@@ -522,8 +522,7 @@ impl Repository {
|
|
|
|
|
|
| - | |
| - | |
| + | |
|
|
|
|
|