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
@ -18,7 +18,7 @@ void create_notes_commit(struct notes_tree *t, struct commit_list *parents,
|
||||
unsigned char parent_sha1[20];
|
||||
if (!read_ref(t->ref, parent_sha1)) {
|
||||
struct commit *parent = lookup_commit(parent_sha1);
|
||||
if (!parent || parse_commit(parent))
|
||||
if (parse_commit(parent))
|
||||
die("Failed to find/parse commit %s", t->ref);
|
||||
commit_list_insert(parent, &parents);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user