summaryrefslogtreecommitdiff
path: root/src/diff_stats.c
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2014-05-12 10:28:45 -0700
committerRussell Belfer <rb@github.com>2014-05-12 10:28:45 -0700
commitce3b71d91b9cac3b462dec9ac2c7e397b55c00a6 (patch)
treed644cd507c33e44f720732c3006c82f7268f0fd6 /src/diff_stats.c
parentb1914c36511af468366482c4dc8974bd1c2995fc (diff)
downloadlibgit2-ce3b71d91b9cac3b462dec9ac2c7e397b55c00a6.tar.gz
Don't scale diff stat when not needed
Diffstat (limited to 'src/diff_stats.c')
-rw-r--r--src/diff_stats.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/diff_stats.c b/src/diff_stats.c
index 6ad670c42..42ccbfb87 100644
--- a/src/diff_stats.c
+++ b/src/diff_stats.c
@@ -284,6 +284,8 @@ int git_diff_stats_to_buf(
if (width < STATS_FULL_MIN_SCALE)
width = STATS_FULL_MIN_SCALE;
}
+ if (width > stats->max_filestat)
+ width = 0;
for (i = 0; i < stats->files_changed; ++i) {
if ((delta = git_diff_get_delta(stats->diff, i)) == NULL)