Skip to content

Commit 02d3dca

Browse files
Linus TorvaldsJunio C Hamano
Linus Torvalds
authored and
Junio C Hamano
committed
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0556a11 commit 02d3dca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

revision.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,7 @@ struct commit *get_revision(struct rev_info *revs)
997997
if (!revs->parents)
998998
continue;
999999
/* non-merge - always ignore it */
1000-
if (commit->parents && !commit->parents->next)
1000+
if (!commit->parents || !commit->parents->next)
10011001
continue;
10021002
}
10031003
if (revs->parents)

0 commit comments

Comments
 (0)