@matheusbsbs / matheus-bagliano / commits / 66e41f7b99
Fork 0

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 <gitster@pobox.com>

Junio C Hamano committed Jun 15, 2007 at 23:48 UTC 66e41f7b9912b3c9231c6577891eb12886d430e3
1 file changed +2 -1
revision.c
+2 -1
@@ -1171,7 +1171,8 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
1171
1172 opts = diff_opt_parse(&revs->diffopt, argv+i, argc-i);
1173 if (opts > 0) {
1174 - revs->diff = 1;
1174 + if (strcmp(argv[i], "-z"))
1175 + revs->diff = 1;
1176 i += opts - 1;
1177 continue;
1178 }