Thread (1 message) 1 message, 1 author, 2016-06-15
  • (off-list ancestor, not in this archive)
  • Re: git-rev-list bug? · Junio C Hamano <hidden> · 2016-06-15

Re: git-rev-list bug?

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:21
Subsystem: the rest · Maintainer: Linus Torvalds

Possibly related (same subject, not in this thread)

Junio C Hamano [off-list ref] writes:
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:
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help