summaryrefslogtreecommitdiff
path: root/shallow.c
diff options
context:
space:
mode:
authorMartin Koegler <mkoegler@auto.tuwien.ac.at>2008-02-18 20:48:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-02-19 04:49:13 (GMT)
commitdec38c81657f02624752a65c24d72613316713f5 (patch)
tree7374e801dde04ec87a62fa4740c5a233523cac2c /shallow.c
parent9786f68bfcc082778aee74159540e341bb239514 (diff)
downloadgit-dec38c81657f02624752a65c24d72613316713f5.zip
git-dec38c81657f02624752a65c24d72613316713f5.tar.gz
git-dec38c81657f02624752a65c24d72613316713f5.tar.bz2
check return value from parse_commit() in various functions
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'shallow.c')
-rw-r--r--shallow.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/shallow.c b/shallow.c
index dbd9f5a..ab97548 100644
--- a/shallow.c
+++ b/shallow.c
@@ -70,7 +70,8 @@ struct commit_list *get_shallow_commits(struct object_array *heads, int depth,
cur_depth = *(int *)commit->util;
}
}
- parse_commit(commit);
+ if (parse_commit(commit))
+ die("invalid commit");
commit->object.flags |= not_shallow_flag;
cur_depth++;
for (p = commit->parents, commit = NULL; p; p = p->next) {