-rw-r--r-- | ui-diff.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -97,24 +97,26 @@ void cgit_print_diff(const char *head, const char *old_hex, const char *new_hex, struct commit *commit; html("<table class='diff'>"); html("<tr><td>"); if (head && !old_hex && !new_hex) { get_sha1(head, sha1); commit = lookup_commit_reference(sha1); if (commit && !parse_commit(commit)) cgit_diff_commit(commit, filepair_cb); else cgit_print_error(fmt("Bad commit: %s", head)); + html("</td></tr>"); + html("</table>"); return; } get_sha1(old_hex, sha1); get_sha1(new_hex, sha2); type = sha1_object_info(sha1, &size); if (type == OBJ_BAD) { type = sha1_object_info(sha2, &size); if (type == OBJ_BAD) { cgit_print_error(fmt("Bad object names: %s, %s", old_hex, new_hex)); return; |