summaryrefslogtreecommitdiff
path: root/src/diff_print.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/diff_print.c')
-rw-r--r--src/diff_print.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/diff_print.c b/src/diff_print.c
index 07c1f8577..08e1e7f90 100644
--- a/src/diff_print.c
+++ b/src/diff_print.c
@@ -597,9 +597,9 @@ int git_diff_print_callback__to_file_handle(
}
/* print a git_patch to a git_buf */
-int git_patch_to_buf(
- git_buf *out,
- git_patch *patch)
+int git_patch_to_buf(git_buf *out, git_patch *patch)
{
+ assert(out && patch);
+ git_buf_sanitize(out);
return git_patch_print(patch, git_diff_print_callback__to_buf, out);
}