mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
diff: parse patches with sha256
This commit is contained in:
@@ -188,9 +188,17 @@ static void compute_diff_no_index(git_diff **diff, struct diff_options *o) {
|
||||
check_lg2(
|
||||
git_patch_to_buf(&buf, patch),
|
||||
"patch to buf", NULL);
|
||||
|
||||
#ifdef GIT_EXPERIMENTAL_SHA256
|
||||
check_lg2(
|
||||
git_diff_from_buffer(diff, buf.ptr, buf.size, NULL),
|
||||
"diff from patch", NULL);
|
||||
#else
|
||||
check_lg2(
|
||||
git_diff_from_buffer(diff, buf.ptr, buf.size),
|
||||
"diff from patch", NULL);
|
||||
#endif
|
||||
|
||||
git_patch_free(patch);
|
||||
git_buf_dispose(&buf);
|
||||
free(file1_str);
|
||||
|
||||
Reference in New Issue
Block a user