diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2007-09-29 20:50:39 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-09-30 02:42:32 +0400 |
commit | b7bb760d5ed4881422673d32f869d140221d3564 (patch) | |
tree | 020763d363c0c949a4598e00ae92cdfb6846275c /Documentation/git-pack-objects.txt | |
parent | ee8245b54a2e4ea8838d28a7bcce2e07ef887a2c (diff) |
Fix revision log diff setup, avoid unnecessary diff generation
We used to incorrectly start calculating diffs whenever any argument but
'-z' was recognized by the diff options parsing. That was bogus, since not
all arguments result in diffs being needed, so we just waste a lot of time
and effort on calculating diffs that don't matter.
This actually also fixes another bug in "git log". Try this:
git log -C
and notice how it prints an extra empty line in between log entries, even
though it never prints the actual diff (because we didn't ask for any diff
format, so the diff machinery never prints anything).
With this patch, that bogus empty line is gone, because "revs->diff" is
never set. So this isn't just a "wasted time and effort" issue, it's also
a slight semantic fix.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-pack-objects.txt')
0 files changed, 0 insertions, 0 deletions