vendor/libgit2/src/diff_print.c in rugged-1.4.2 vs vendor/libgit2/src/diff_print.c in rugged-1.4.3
- old
+ new
@@ -314,9 +314,14 @@
}
static int diff_delta_format_path(
git_str *out, const char *prefix, const char *filename)
{
+ if (!filename) {
+ /* don't prefix "/dev/null" */
+ return git_str_puts(out, "/dev/null");
+ }
+
if (git_str_joinpath(out, prefix, filename) < 0)
return -1;
return git_str_quote(out);
}