Skip to content

Commit

Permalink
Avoid diff cost on "git log -z"
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Jun 16, 2007
1 parent 7b99bef commit 66e41f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion revision.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 66e41f7

Please sign in to comment.