aboutsummaryrefslogtreecommitdiff
path: root/upload-pack.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-12-05 12:54:01 -0800
committerJunio C Hamano <gitster@pobox.com>2013-12-05 12:54:01 -0800
commit5bb62059f21ebe8a38226f6fbe76f0f9b6ad65f7 (patch)
tree52523c896b1eb72ed8cddb52261b7f9a909b71f0 /upload-pack.c
parentb2a0afd96a40d6cdbba96ac9735a7b489d8d563e (diff)
parent3c62183929080c17299d5b404eb092e3d53c161a (diff)
downloadgit-5bb62059f21ebe8a38226f6fbe76f0f9b6ad65f7.tar.gz
git-5bb62059f21ebe8a38226f6fbe76f0f9b6ad65f7.tar.xz
Merge branch 'jk/robustify-parse-commit'
* jk/robustify-parse-commit: checkout: do not die when leaving broken detached HEAD use parse_commit_or_die instead of custom message use parse_commit_or_die instead of segfaulting assume parse_commit checks for NULL commit assume parse_commit checks commit->object.parsed log_tree_diff: die when we fail to parse a commit
Diffstat (limited to 'upload-pack.c')
-rw-r--r--upload-pack.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/upload-pack.c b/upload-pack.c
index c989a737f..d30f339e7 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -649,8 +649,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,