diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-12-05 21:54:01 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-12-05 21:54:01 +0100 |
commit | 5bb62059f21ebe8a38226f6fbe76f0f9b6ad65f7 (patch) | |
tree | 52523c896b1eb72ed8cddb52261b7f9a909b71f0 /upload-pack.c | |
parent | Merge branch 'ak/submodule-foreach-quoting' (diff) | |
parent | checkout: do not die when leaving broken detached HEAD (diff) | |
download | git-5bb62059f21ebe8a38226f6fbe76f0f9b6ad65f7.tar.xz git-5bb62059f21ebe8a38226f6fbe76f0f9b6ad65f7.zip |
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.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/upload-pack.c b/upload-pack.c index c989a737f9..d30f339e70 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, |