Unidiff1 files changed, 13 insertions, 1 deletions
|
diff --git a/ui-diff.c b/ui-diff.c index 999b6f3..afe1c90 100644 --- a/ ui-diff.c+++ b/ ui-diff.c |
|
@@ -68,3 +68,3 @@ static void filepair_cb(struct diff_filepair *pair) |
68 | |
68 | |
69 | void cgit_print_diff(const char *old_hex, const char *new_hex, char *path) |
69 | void cgit_print_diff(const char *head, const char *old_hex, const char *new_hex, char *path) |
70 | { |
70 | { |
@@ -73,2 +73,14 @@ void cgit_print_diff(const char *old_hex, const char *new_hex, char *path) |
73 | unsigned long size; |
73 | unsigned long size; |
| |
74 | struct commit *commit; |
| |
75 | |
| |
76 | if (head && !old_hex && !new_hex) { |
| |
77 | get_sha1(head, sha1); |
| |
78 | commit = lookup_commit_reference(sha1); |
| |
79 | if (commit && !parse_commit(commit)) { |
| |
80 | html("<table class='diff'>"); |
| |
81 | cgit_diff_commit(commit, filepair_cb); |
| |
82 | html("</td></tr></table>"); |
| |
83 | } |
| |
84 | return; |
| |
85 | } |
74 | |
86 | |
|