提交 02d3dca3 编写于 作者: L Linus Torvalds 提交者: Junio C Hamano

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: NLinus Torvalds <torvalds@osdl.org>
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 0556a11a
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册