提交 3b7d368f 编写于 作者: L Linus Torvalds

Don't parse commit objects more than once.

Yes, the "parse_commit()" already checks for this condition, but
we need to check for it in rev-tree too, so that we don't start
walking the parent chain unnecessarily.
上级 0a9ea850
......@@ -55,6 +55,10 @@ void process_commit(unsigned char *sha1)
{
struct commit_list *parents;
struct commit *obj = lookup_commit(sha1);
if (obj->object.parsed)
return;
parse_commit(obj);
parents = obj->parents;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册