Unidiff1 files changed, 4 insertions, 1 deletions
|
diff --git a/ui-diff.c b/ui-diff.c index 7ec5701..999b6f3 100644 --- a/ ui-diff.c+++ b/ ui-diff.c |
|
@@ -30,17 +30,20 @@ static void print_line(char *line, int len) |
30 | html("</div>"); |
30 | html("</div>"); |
31 | line[len-1] = c; |
31 | line[len-1] = c; |
32 | } |
32 | } |
33 | |
33 | |
34 | static void header(unsigned char *sha1, char *path1, |
34 | static void header(unsigned char *sha1, char *path1, |
35 | unsigned char *sha2, char *path2) |
35 | unsigned char *sha2, char *path2) |
36 | { |
36 | { |
37 | char *abbrev1, *abbrev2; |
37 | char *abbrev1, *abbrev2; |
38 | |
38 | if (is_null_sha1(sha1)) |
| |
39 | path1 = "dev/null"; |
| |
40 | if (is_null_sha1(sha2)) |
| |
41 | path2 = "dev/null"; |
39 | html("<tr><td>"); |
42 | html("<tr><td>"); |
40 | html("<div class='head'>"); |
43 | html("<div class='head'>"); |
41 | html("diff --git a/"); |
44 | html("diff --git a/"); |
42 | html_txt(path1); |
45 | html_txt(path1); |
43 | html(" b/"); |
46 | html(" b/"); |
44 | html_txt(path2); |
47 | html_txt(path2); |
45 | abbrev1 = xstrdup(find_unique_abbrev(sha1, DEFAULT_ABBREV)); |
48 | abbrev1 = xstrdup(find_unique_abbrev(sha1, DEFAULT_ABBREV)); |
46 | abbrev2 = xstrdup(find_unique_abbrev(sha2, DEFAULT_ABBREV)); |
49 | abbrev2 = xstrdup(find_unique_abbrev(sha2, DEFAULT_ABBREV)); |
|