On Thu, Apr 7, 2011 at 12:30, Lukas Fleischer <[email protected]> wrote: > On Thu, Apr 07, 2011 at 12:15:19PM +0200, Lars Hjemli wrote: >> +++ b/ui-diff.c >> @@ -368,8 +368,10 @@ void cgit_print_diff(const char *new_rev, const char >> *old_r >> 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); > > Yeah, I wasn't sure since there are other "Bad commit" error handlers > below that do not "return;" as well, whereas all other error handlers > do. My assumption that this is intended and execution should continue in > this case (maybe to build the remaining page properly and display the > error message somewhere inbetween).
No, the two missing returns (I only saw the first, thanks for noticing) are simply bugs. -- larsh _______________________________________________ cgit mailing list [email protected] http://hjemli.net/mailman/listinfo/cgit
