aboutsummaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorLucian Poston <lucian.poston@gmail.com>2012-04-16 03:44:51 -0700
committerJunio C Hamano <gitster@pobox.com>2012-04-16 11:28:39 -0700
commit3f1451326a09a4e36c10feff65685daef1d29c32 (patch)
treece9f969fa9792c7d238a0f10e649dae8474d4191 /diff.c
parent5e71a84a2da8f5dd32c13392854eab4d448c8085 (diff)
downloadgit-3f1451326a09a4e36c10feff65685daef1d29c32.tar.gz
git-3f1451326a09a4e36c10feff65685daef1d29c32.tar.xz
Adjust stat width calculations to take --graph output into account
The recent change to compute the width of diff --stat did not take into consideration the output from --graph. The consequence is that when both options are used, e.g. in 'log --stat --graph', the lines are too long. Adjust stat width calculations to take --graph output into account. Signed-off-by: Lucian Poston <lucian.poston@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/diff.c b/diff.c
index 377ec1ea4..0b61cf7c7 100644
--- a/diff.c
+++ b/diff.c
@@ -1445,7 +1445,7 @@ static void show_stats(struct diffstat_t *data, struct diff_options *options)
*/
if (options->stat_width == -1)
- width = term_columns();
+ width = term_columns() - options->output_prefix_length;
else
width = options->stat_width ? options->stat_width : 80;