Skip to content

Commit 4bfd7c6

Browse files
author
Edward Thomson
committed
patch: error on diff callback failure
1 parent ce54e77 commit 4bfd7c6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/patch.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ int git_patch__invoke_callbacks(
1717
if (file_cb)
1818
error = file_cb(patch->delta, 0, payload);
1919

20+
if (error)
21+
return error;
22+
2023
if ((patch->delta->flags & GIT_DIFF_FLAG_BINARY) != 0) {
2124
if (binary_cb)
2225
error = binary_cb(patch->delta, &patch->binary, payload);

0 commit comments

Comments
 (0)