Commit 18f4293943894155d5ccbdb423f1e8a2bb1e1d62

Stefan Sperling 2018-12-24T10:49:42

show blob headers in diffs for added/deleted files

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/lib/diff.c b/lib/diff.c
index 2f649f7..de31251 100644
--- a/lib/diff.c
+++ b/lib/diff.c
@@ -146,11 +146,8 @@ diff_blobs(struct got_blob_object *blob1, struct got_blob_object *blob2,
 	args.diff_context = diff_context;
 	flags |= D_PROTOTYPE;
 
-	if (label1 && strncmp(label1, idstr1, strlen(idstr1)) != 0)
-		fprintf(outfile, "blob - %s\n", idstr1);
-	if (label2 && strncmp(label2, idstr2, strlen(idstr2)) != 0)
-		fprintf(outfile, "blob + %s\n", idstr2);
-
+	fprintf(outfile, "blob - %s\n", idstr1);
+	fprintf(outfile, "blob + %s\n", idstr2);
 	err = got_diffreg(&res, f1, f2, flags, &args, &ds, outfile, changes);
 done:
 	free(l1);