Skip to content

Commit

Permalink
get_sha1_oneline: check return value of parse_object
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Martin Koegler authored and Junio C Hamano committed Feb 19, 2008
1 parent 50974ec commit 283cdbc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sha1_name.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 283cdbc

Please sign in to comment.