From: Junio C Hamano Date: Sat, 16 Jun 2007 06:48:35 +0000 (-0700) Subject: Avoid diff cost on "git log -z" X-Git-Tag: v1.5.2.2~2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=66e41f7b9912b3c9231c6577891eb12886d430e3;p=git.git 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: Junio C Hamano --- diff --git a/revision.c b/revision.c index 0125d4113..e43c64897 100644 --- a/revision.c +++ b/revision.c @@ -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); if (opts > 0) { - revs->diff = 1; + if (strcmp(argv[i], "-z")) + revs->diff = 1; i += opts - 1; continue; }