提交 66e41f7b 编写于 作者: J Junio C Hamano

Avoid diff cost on "git log -z"

Johannes and Marco discovered that "git log -z" spent cycles in diff even
though there is no need to actually compute diffs.
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 7b99befe
...@@ -1171,7 +1171,8 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch ...@@ -1171,7 +1171,8 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
opts = diff_opt_parse(&revs->diffopt, argv+i, argc-i); opts = diff_opt_parse(&revs->diffopt, argv+i, argc-i);
if (opts > 0) { if (opts > 0) {
revs->diff = 1; if (strcmp(argv[i], "-z"))
revs->diff = 1;
i += opts - 1; i += opts - 1;
continue; continue;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册