Re: git-rev-list bug?
- From
Junio C Hamano <junkio@cox.net>
- Date
- Mar 10, 2006, 09:59 UTC
- Message-ID
- <7v4q26zklx.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <7virqmzlhb.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> writes:
Show 7 quoted lines
> I am wondering why try_to_simplify_commit() skips parents marked > with UNINTERESTING. I think this is causing a problem Catalin > found with rev-list. > ... > The attached patch seems to fix it (without losing the logic to > omit tree comparison with UNINTERESTING parent, which I do not > quite understand).
Actually the previous patch is not right either. If I ask "what changes path B between commit#1..commit#4", it would still omit commit#2.
It should not matter if the parent is uninteresting while checking if a commit touches the specified path. The attached patch which replaces the previous botched one does exactly that.
It however has a side effect -- uninteresting commits were never parsed here, but now they get parsed. I am not sure if there are correctness implications...
---
diff --git a/revision.c b/revision.c index 713f27e..9d0934a 100644 --- a/revision.c +++ b/revision.c @@ -296,11 +296,6 @@ static void try_to_simplify_commit(struc while ((parent = *pp) != NULL) { struct commit *p = parent->item; - if (p->object.flags & UNINTERESTING) { - pp = &parent->next; - continue; - } - parse_commit(p); switch (compare_tree(p->tree, commit->tree)) { case TREE_SAME: