diff options
author | Lars Hjemli | 2011-05-23 23:26:10 +0200 |
---|---|---|
committer | Lars Hjemli | 2011-05-23 23:26:10 +0200 |
commit | 652a5a18db3b0409fedfaf8c5720446d87628ba0 (patch) | |
tree | cefa386058d968217af24374b93972820a9b43a8 /ui-diff.c | |
parent | 4837fddc35bbd8d6f66a40486f75cdee3197172d (diff) | |
parent | ec79265f2053e6dc20e0ec486719f5954d2be83d (diff) | |
download | cgit-652a5a18db3b0409fedfaf8c5720446d87628ba0.tar.gz cgit-652a5a18db3b0409fedfaf8c5720446d87628ba0.tar.bz2 cgit-652a5a18db3b0409fedfaf8c5720446d87628ba0.zip |
Merge branch 'stable'
Diffstat (limited to 'ui-diff.c')
-rw-r--r-- | ui-diff.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -345,8 +345,10 @@ void cgit_print_diff(const char *new_rev, const char *old_rev, const char *prefi | |||
345 | return; | 345 | return; |
346 | } | 346 | } |
347 | commit = lookup_commit_reference(new_rev_sha1); | 347 | commit = lookup_commit_reference(new_rev_sha1); |
348 | if (!commit || parse_commit(commit)) | 348 | if (!commit || parse_commit(commit)) { |
349 | cgit_print_error(fmt("Bad commit: %s", sha1_to_hex(new_rev_sha1))); | 349 | cgit_print_error(fmt("Bad commit: %s", sha1_to_hex(new_rev_sha1))); |
350 | return; | ||
351 | } | ||
350 | 352 | ||
351 | if (old_rev) | 353 | if (old_rev) |
352 | get_sha1(old_rev, old_rev_sha1); | 354 | get_sha1(old_rev, old_rev_sha1); |
@@ -362,8 +364,10 @@ void cgit_print_diff(const char *new_rev, const char *old_rev, const char *prefi | |||
362 | return; | 364 | return; |
363 | } | 365 | } |
364 | commit2 = lookup_commit_reference(old_rev_sha1); | 366 | commit2 = lookup_commit_reference(old_rev_sha1); |
365 | if (!commit2 || parse_commit(commit2)) | 367 | if (!commit2 || parse_commit(commit2)) { |
366 | cgit_print_error(fmt("Bad commit: %s", sha1_to_hex(old_rev_sha1))); | 368 | cgit_print_error(fmt("Bad commit: %s", sha1_to_hex(old_rev_sha1))); |
369 | return; | ||
370 | } | ||
367 | } | 371 | } |
368 | 372 | ||
369 | if ((ctx.qry.ssdiff && !ctx.cfg.ssdiff) || (!ctx.qry.ssdiff && ctx.cfg.ssdiff)) | 373 | if ((ctx.qry.ssdiff && !ctx.cfg.ssdiff) || (!ctx.qry.ssdiff && ctx.cfg.ssdiff)) |