From: Junio C Hamano Date: Wed, 11 Feb 2009 10:00:22 +0000 (-0800) Subject: Merge branch 'maint' X-Git-Tag: v1.6.2-rc1~29 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/aff4e8dc217bdde9276e634ea7bf92adf926e573?ds=inline;hp=-c Merge branch 'maint' * maint: revision traversal and pack: notice and die on missing commit --- aff4e8dc217bdde9276e634ea7bf92adf926e573 diff --combined revision.c index 8603c14581,c0df714f6c..286e416b75 --- a/revision.c +++ b/revision.c @@@ -183,11 -183,8 +183,11 @@@ static struct commit *handle_commit(str if (!tag->tagged) die("bad tag"); object = parse_object(tag->tagged->sha1); - if (!object) + if (!object) { + if (flags & UNINTERESTING) + return NULL; die("bad object %s", sha1_to_hex(tag->tagged->sha1)); + } } /* @@@ -482,10 -479,9 +482,10 @@@ static int add_parents_to_list(struct r while (parent) { struct commit *p = parent->item; parent = parent->next; + if (p) + p->object.flags |= UNINTERESTING; if (parse_commit(p) < 0) - return -1; - p->object.flags |= UNINTERESTING; + continue; if (p->parents) mark_parents_uninteresting(p); if (p->object.flags & SEEN) @@@ -1738,14 -1734,16 +1738,16 @@@ static struct commit *get_revision_1(st (commit->date < revs->max_age)) continue; if (add_parents_to_list(revs, commit, &revs->commits, NULL) < 0) - return NULL; + die("Failed to traverse parents of commit %s", + sha1_to_hex(commit->object.sha1)); } switch (simplify_commit(revs, commit)) { case commit_ignore: continue; case commit_error: - return NULL; + die("Failed to simplify parents of commit %s", + sha1_to_hex(commit->object.sha1)); default: return commit; }