@matheusbsbs / matheus-bagliano / commits / 02d3dca3bf
Fork 0

revision.c: fix "dense" under --remove-empty

It had the wrong test for whether a commit was a merge. What it did was to say that a non-merge has exactly one parent (which sounds almost right), but the fact is, initial trees have no parent at all, but they're obviously not merges. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>

Linus Torvalds committed Jul 2, 2006 at 10:55 UTC 02d3dca3bff6a67dead9f5b97dfe3576fe5b14e5
1 file changed +1 -1
revision.c
+1 -1
@@ -997,7 +997,7 @@ struct commit *get_revision(struct rev_info *revs)
997 if (!revs->parents)
998 continue;
999 /* non-merge - always ignore it */
1000 - if (commit->parents && !commit->parents->next)
1000 + if (!commit->parents || !commit->parents->next)
1001 continue;
1002 }
1003 if (revs->parents)