Commit Diff


commit - a67e2392eac3beae1d98cd5f1315f73cebf55597
commit + 049da17d24a611282abd3553f6f43d75609a7fab
blob - 0a0c2462adeea20a838667cf2dc30811a6405fdf
blob + 8f10487f075939999a42f3ca045ab7ea935aabcc
--- lib/diff.c
+++ lib/diff.c
@@ -175,7 +175,7 @@ got_diff_blob_file(struct got_blob_object *blob1, FILE
 	flags |= D_PROTOTYPE;
 
 	fprintf(outfile, "blob - %s\n", idstr1);
-	fprintf(outfile, "file + %s\n", label2);
+	fprintf(outfile, "file + %s\n", f2 == NULL ? "/dev/null" : label2);
 	err = got_diffreg(&res, f1, f2, flags, &args, &ds, outfile, NULL);
 done:
 	if (f1 && fclose(f1) != 0 && err == NULL)