Re: Bad objects error since upgrading GitHub servers to 1.6.1
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Jan 28, 2009, 15:45 UTC
- Message-ID
- <alpine.LFD.2.00.0901280738430.3123@localhost.localdomain>
- In-Reply-To
- <7vvdrzvpwd.fsf@gitster.siamese.dyndns.org>
On Tue, 27 Jan 2009, Junio C Hamano wrote:
Show 5 quoted lines
> > - When digging deeper into the ancestry chain of a commit that is already > painted as UNINTERESTING, in order to paint its parents UNINTERESTING, > we barfed if parse_parent() for a parent commit object failed. We can > ignore such a parent commit object.
Wouldn't it be better to still mark it UNINTERESTING too?
Show 9 quoted lines
> @@ -480,7 +483,7 @@ static int add_parents_to_list(struct rev_info *revs, struct commit *commit, > struct commit *p = parent->item; > parent = parent->next; > if (parse_commit(p) < 0) > - return -1; > + continue; > p->object.flags |= UNINTERESTING; > if (p->parents) > mark_parents_uninteresting(p);
IOW, move that
p->object.flags |= UNINTERESTING;
to before parse_commit(). That's assuming 'parent' is never NULL, of course.
Side note: parse_commit() is still going to print out the error message if the object is missing ("Could not read %s"). I guess that's fine, but if you really want to make this a "not an error at all" condition...
Linus