Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [POSSIBLE REGRESSION] Spurious revs after patch "revision.c: --full-history fix"

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:32

Linus Torvalds [off-list ref] writes:
Gaah. Does this trivial patch fix it for you?

It had the wrong test for whether a commit was a merge.
Gaah indeed -- I did not notice the logic error when I picked it
up either, sorry.
quoted hunk
diff --git a/revision.c b/revision.c
index 1cf6276..880fb7b 100644
--- a/revision.c
+++ b/revision.c
@@ -997,7 +997,7 @@ struct commit *get_revision(struct rev_i
 				if (!revs->parents)
 					continue;
 				/* non-merge - always ignore it */
-				if (commit->parents && !commit->parents->next)
+				if (!commit->parents || !commit->parents->next)
 					continue;
 			}
 			if (revs->parents)
For a casual reader who is curious, the reason it matters to
treat the "root" commit sanely in this example is because with
the --remove-empty option the commits that add the specified
paths are already made into "fake" root commits when the above
function sees them (done in try_to_simplify_commit()).

Thanks, Linus and Marco.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help