summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7b99bef)
raw | patch | inline | side by side (parent: 7b99bef)
author | Junio C Hamano <gitster@pobox.com> | |
Sat, 16 Jun 2007 06:48:35 +0000 (23:48 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 16 Jun 2007 06:48:35 +0000 (23:48 -0700) |
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>
though there is no need to actually compute diffs.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
revision.c | patch | blob | history |
diff --git a/revision.c b/revision.c
index 0125d41136871ad2cd07daaaabf40bd2f902a44f..e43c6489785a61707b838df782d2859ec6654651 100644 (file)
--- 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;
}