summaryrefslogtreecommitdiff
path: root/fetch-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 /fetch-pack.c
parentb2a0afd96a40d6cdbba96ac9735a7b489d8d563e (diff)
parent3c62183929080c17299d5b404eb092e3d53c161a (diff)
downloadgit-5bb62059f21ebe8a38226f6fbe76f0f9b6ad65f7.tar.gz
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 'fetch-pack.c')
-rw-r--r--fetch-pack.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fetch-pack.c b/fetch-pack.c
index 1042448fa0..5a1200f1a0 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -47,9 +47,8 @@ static void rev_list_push(struct commit *commit, int mark)
if (!(commit->object.flags & mark)) {
commit->object.flags |= mark;
- if (!(commit->object.parsed))
- if (parse_commit(commit))
- return;
+ if (parse_commit(commit))
+ return;
prio_queue_put(&rev_list, commit);
@@ -128,8 +127,7 @@ static const unsigned char *get_rev(void)
return NULL;
commit = prio_queue_get(&rev_list);
- if (!commit->object.parsed)
- parse_commit(commit);
+ parse_commit(commit);
parents = commit->parents;
commit->object.flags |= POPPED;