Remove unused object-ref code
[gitweb.git] / shallow.c
index dbd9f5ad0ac21e70fc3a095d8e2938f245c238d3..ab975482d0571fa4b647bb3bc9f5032947dc0f3e 100644 (file)
--- 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) {