Commit 8f97f26169a01f296bafca1867dbc1bb677981a7

Stefan Sperling 2018-09-14T00:13:19

show blob IDs in diffs again and make repository test pass

diff --git a/lib/diff.c b/lib/diff.c
index 58ae938..1d149da 100644
--- a/lib/diff.c
+++ b/lib/diff.c
@@ -101,6 +101,9 @@ diff_blobs(struct got_blob_object *blob1, struct got_blob_object *blob2,
 	args.diff_context = 3;
 	flags |= D_PROTOTYPE;
 
+	fprintf(outfile, "blob %s ---\n", idstr1);
+	fprintf(outfile, "blob %s +++\n", idstr2);
+
 	err = got_diffreg(&res, f1, f2, flags, &args, &ds, outfile, changes);
 done:
 	if (f1)
diff --git a/regress/repository/repository_test.c b/regress/repository/repository_test.c
index ed18000..42f3d85 100644
--- a/regress/repository/repository_test.c
+++ b/regress/repository/repository_test.c
@@ -312,8 +312,10 @@ repo_diff_blob(const char *repo_path)
 	size_t len;
 	const char delim[3] = {'\0', '\0', '\0'};
 	const char *expected_output[] = {
-		"--- 141f5fdc96126c1f4195558560a3c915e3d9b4c3",
-		"+++ de7eb21b21c7823a753261aadf7cba35c9580fbf",
+		"blob 141f5fdc96126c1f4195558560a3c915e3d9b4c3 ---",
+		"blob de7eb21b21c7823a753261aadf7cba35c9580fbf +++",
+		"--- regress/repository_test/Makefile",
+		"+++ regress/repository_test/Makefile",
 		"@@ -1,10 +1,10 @@",
 		" .PATH:${.CURDIR}/../../lib",
 		" ",