diff options
author | Jeff King <peff@peff.net> | 2013-10-24 04:53:19 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-10-24 15:43:50 -0700 |
commit | 5e7d4d3e932432131d0f8f4195e0061ecf644865 (patch) | |
tree | 69826f91be44e4096551bc75e884f0f1db7d8db5 /notes-utils.c | |
parent | 0064053bd76ba385e1b5d51b6175bc17bc507804 (diff) | |
download | git-5e7d4d3e932432131d0f8f4195e0061ecf644865.tar.gz |
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>
Diffstat (limited to 'notes-utils.c')
-rw-r--r-- | notes-utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/notes-utils.c b/notes-utils.c index 9107c379d9..7bb3473dbe 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); } |