summaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-06-16 06:48:35 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-06-16 06:48:35 (GMT)
commit66e41f7b9912b3c9231c6577891eb12886d430e3 (patch)
tree8fea640ebddd125c6498b3cbfb42ae565804ff1b /revision.c
parent7b99befef7d0ae173980f531e80916126011ca41 (diff)
downloadgit-66e41f7b9912b3c9231c6577891eb12886d430e3.zip
git-66e41f7b9912b3c9231c6577891eb12886d430e3.tar.gz
git-66e41f7b9912b3c9231c6577891eb12886d430e3.tar.bz2
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>
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/revision.c b/revision.c
index 0125d41..e43c648 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;
}