From: Martin Koegler Date: Mon, 18 Feb 2008 20:47:53 +0000 (+0100) Subject: get_sha1_oneline: check return value of parse_object X-Git-Tag: v1.5.5-rc0~193^2~10 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=283cdbcf49401cc56169f8f36b7ddc8b8223b2b9;p=git.git get_sha1_oneline: check return value of parse_object Signed-off-by: Martin Koegler Signed-off-by: Junio C Hamano --- diff --git a/sha1_name.c b/sha1_name.c index 13e11645e..4c0bc9c5b 100644 --- a/sha1_name.c +++ b/sha1_name.c @@ -617,7 +617,8 @@ static int get_sha1_oneline(const char *prefix, unsigned char *sha1) unsigned long size; commit = pop_most_recent_commit(&list, ONELINE_SEEN); - parse_object(commit->object.sha1); + if (!parse_object(commit->object.sha1)) + continue; if (temp_commit_buffer) free(temp_commit_buffer); if (commit->buffer)