aboutsummaryrefslogtreecommitdiffstats
path: root/ui-diff.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui-diff.c')
-rw-r--r--ui-diff.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/ui-diff.c b/ui-diff.c
index b7767b3..868ceec 100644
--- a/ui-diff.c
+++ b/ui-diff.c
@@ -368,8 +368,10 @@ void cgit_print_diff(const char *new_rev, const char *old_rev,
368 return; 368 return;
369 } 369 }
370 commit = lookup_commit_reference(new_rev_sha1); 370 commit = lookup_commit_reference(new_rev_sha1);
371 if (!commit || parse_commit(commit)) 371 if (!commit || parse_commit(commit)) {
372 cgit_print_error(fmt("Bad commit: %s", sha1_to_hex(new_rev_sha1))); 372 cgit_print_error(fmt("Bad commit: %s", sha1_to_hex(new_rev_sha1)));
373 return;
374 }
373 375
374 if (old_rev) 376 if (old_rev)
375 get_sha1(old_rev, old_rev_sha1); 377 get_sha1(old_rev, old_rev_sha1);
@@ -385,8 +387,10 @@ void cgit_print_diff(const char *new_rev, const char *old_rev,
385 return; 387 return;
386 } 388 }
387 commit2 = lookup_commit_reference(old_rev_sha1); 389 commit2 = lookup_commit_reference(old_rev_sha1);
388 if (!commit2 || parse_commit(commit2)) 390 if (!commit2 || parse_commit(commit2)) {
389 cgit_print_error(fmt("Bad commit: %s", sha1_to_hex(old_rev_sha1))); 391 cgit_print_error(fmt("Bad commit: %s", sha1_to_hex(old_rev_sha1)));
392 return;
393 }
390 } 394 }
391 395
392 if ((ctx.qry.ssdiff && !ctx.cfg.ssdiff) || (!ctx.qry.ssdiff && ctx.cfg.ssdiff)) 396 if ((ctx.qry.ssdiff && !ctx.cfg.ssdiff) || (!ctx.qry.ssdiff && ctx.cfg.ssdiff))