Skip to content

Commit

Permalink
show --stat: use the full terminal width
Browse files Browse the repository at this point in the history
Make show --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>
  • Loading branch information
Zbigniew Jędrzejewski-Szmek authored and Junio C Hamano committed Mar 1, 2012
1 parent af9fedc commit 666c92a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions builtin/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,8 @@ int cmd_show(int argc, const char **argv, const char *prefix)
rev.diff = 1;
rev.always_show_header = 1;
rev.no_walk = 1;
rev.diffopt.stat_width = -1; /* Scale to real terminal size */

memset(&opt, 0, sizeof(opt));
opt.def = "HEAD";
opt.tweak = show_rev_tweak_rev;
Expand Down
4 changes: 2 additions & 2 deletions t/t4052-stat-output.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ do
done <<\EOF
ignores expect80 format-patch -1 --stdout
respects expect200 diff HEAD^ HEAD --stat
ignores expect80 show --stat
respects expect200 show --stat
ignores expect80 log -1 --stat
EOF

Expand Down Expand Up @@ -163,7 +163,7 @@ do
done <<\EOF
ignores expect80 format-patch -1 --stdout
respects expect200 diff HEAD^ HEAD --stat
ignores expect80 show --stat
respects expect200 show --stat
ignores expect80 log -1 --stat
EOF

Expand Down

0 comments on commit 666c92a

Please sign in to comment.