summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shallow.c3
-rw-r--r--upload-pack.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/shallow.c b/shallow.c
index 8a9c96d019..a273685e75 100644
--- a/shallow.c
+++ b/shallow.c
@@ -89,8 +89,7 @@ struct commit_list *get_shallow_commits(struct object_array *heads, int depth,
cur_depth = *(int *)commit->util;
}
}
- if (parse_commit(commit))
- die("invalid commit");
+ parse_commit_or_die(commit);
cur_depth++;
if (cur_depth >= depth) {
commit_list_insert(commit, &result);
diff --git a/upload-pack.c b/upload-pack.c
index 127e59a603..c107686cea 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -694,8 +694,7 @@ static void receive_needs(void)
/* make sure the real parents are parsed */
unregister_shallow(object->sha1);
object->parsed = 0;
- if (parse_commit((struct commit *)object))
- die("invalid commit");
+ parse_commit_or_die((struct commit *)object);
parents = ((struct commit *)object)->parents;
while (parents) {
add_object_array(&parents->item->object,