Diffstat (limited to 'ui-diff.c')
| -rw-r--r-- | ui-diff.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -368,10 +368,8 @@ void cgit_print_diff(const char *new_rev, const char *old_rev, return; } commit = lookup_commit_reference(new_rev_sha1); - if (!commit || parse_commit(commit)) { + if (!commit || parse_commit(commit)) cgit_print_error(fmt("Bad commit: %s", sha1_to_hex(new_rev_sha1))); - return; - } if (old_rev) get_sha1(old_rev, old_rev_sha1); @@ -387,10 +385,8 @@ void cgit_print_diff(const char *new_rev, const char *old_rev, return; } commit2 = lookup_commit_reference(old_rev_sha1); - if (!commit2 || parse_commit(commit2)) { + if (!commit2 || parse_commit(commit2)) cgit_print_error(fmt("Bad commit: %s", sha1_to_hex(old_rev_sha1))); - return; - } } if ((ctx.qry.ssdiff && !ctx.cfg.ssdiff) || (!ctx.qry.ssdiff && ctx.cfg.ssdiff)) |