log --stat: use the full terminal width
Make log --stat behave like diff --stat and use the full terminal width. Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Zbigniew Jędrzejewski-Szmek committed
Mar 1, 2012 at 13:26 UTC
5e0ec15eb131075d0c3e61b33bcc7931bbc8bc08
2 files changed
+3
-2
builtin/log.c
+1
@@ -77,6 +77,7 @@ static void cmd_log_init_defaults(struct rev_info *rev)
77
get_commit_format(fmt_pretty, rev);
78
rev->verbose_header = 1;
79
DIFF_OPT_SET(&rev->diffopt, RECURSIVE);
80
+ rev->diffopt.stat_width = -1; /* use full terminal width */
81
rev->abbrev_commit = default_abbrev_commit;
82
rev->show_root_diff = default_show_root;
83
rev->subject_prefix = fmt_patch_subject_prefix;
t/t4052-stat-output.sh
+2
-2
@@ -98,7 +98,7 @@ done <<\EOF
98
ignores expect80 format-patch -1 --stdout
99
respects expect200 diff HEAD^ HEAD --stat
100
respects expect200 show --stat
101
-ignores expect80 log -1 --stat
101
+respects expect200 log -1 --stat
102
EOF
103
104
cat >expect <<'EOF'
@@ -164,7 +164,7 @@ done <<\EOF
164
ignores expect80 format-patch -1 --stdout
165
respects expect200 diff HEAD^ HEAD --stat
166
respects expect200 show --stat
167
-ignores expect80 log -1 --stat
167
+respects expect200 log -1 --stat
168
EOF
169
170
cat >expect <<'EOF'