From 5e7d4d3e932432131d0f8f4195e0061ecf644865 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Thu, 24 Oct 2013 04:53:19 -0400 Subject: 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 Signed-off-by: Junio C Hamano --- notes-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'notes-utils.c') diff --git a/notes-utils.c b/notes-utils.c index 9107c379d..7bb3473db 100644 --- a/notes-utils.c +++ b/notes-utils.c @@ -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); } -- cgit v1.2.1