assume parse_commit checks for NULL commit
The parse_commit function will check whether it was passed a NULL commit pointer, and if so, return an error. There is no need for callers to check this separately. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
0064053bd7
commit
5e7d4d3e93
@ -490,7 +490,7 @@ static void add_verbose_info(struct strbuf *out, struct ref_item *item,
|
||||
const char *sub = _(" **** invalid ref ****");
|
||||
struct commit *commit = item->commit;
|
||||
|
||||
if (commit && !parse_commit(commit)) {
|
||||
if (!parse_commit(commit)) {
|
||||
pp_commit_easy(CMIT_FMT_ONELINE, commit, &subject);
|
||||
sub = subject.buf;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user