Skip to content

Commit

Permalink
revision.c: fix "dense" under --remove-empty
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Linus Torvalds authored and Junio C Hamano committed Jul 2, 2006
1 parent 0556a11 commit 02d3dca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion revision.c
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,7 @@ struct commit *get_revision(struct rev_info *revs)
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)
Expand Down

0 comments on commit 02d3dca

Please sign in to comment.