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 setting[^0]
[^0]: https://github.com/libgit2/libgit2/issues/6637
To keep the sorting of diffs that is provided by git we should change
the way we serialize them and avoid putting them into separate
modification specific properties.
This allows us to know the blob oid of a moved or copied file, even when
no diff is available.
Also changes the structure of a copied file to be the same as a moved or
renamed file.
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
To test a copy operation of a file modified in the same changeset, we
need to create a copy of the file in the same changeset.
We copy the modified README.md to a new folder called `file_operations`.
Without the `-r` flag the read command isn't able to extract the values
correctly from the comma separated lines on macOS.
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
The information on how many line insertions and deletions happened in a
diff, as well as files changed is something that is used multiple times
downstream, so it makes the code terser by implementing this
function here.
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>