summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Koegler <mkoegler@auto.tuwien.ac.at>2008-02-18 20:47:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-02-19 03:20:18 (GMT)
commit283cdbcf49401cc56169f8f36b7ddc8b8223b2b9 (patch)
tree61176df925bef1977ac222f700ed57a12097ed74
parent50974ec99408b2d814360863e72a5eca613889c8 (diff)
downloadgit-283cdbcf49401cc56169f8f36b7ddc8b8223b2b9.zip
git-283cdbcf49401cc56169f8f36b7ddc8b8223b2b9.tar.gz
git-283cdbcf49401cc56169f8f36b7ddc8b8223b2b9.tar.bz2
get_sha1_oneline: check return value of parse_object
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--sha1_name.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sha1_name.c b/sha1_name.c
index 13e1164..4c0bc9c 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)