Skip to content

Commit

Permalink
log --stat: use the full terminal width
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Zbigniew Jędrzejewski-Szmek authored and Junio C Hamano committed Mar 1, 2012
1 parent 666c92a commit 5e0ec15
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions builtin/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ static void cmd_log_init_defaults(struct rev_info *rev)
get_commit_format(fmt_pretty, rev);
rev->verbose_header = 1;
DIFF_OPT_SET(&rev->diffopt, RECURSIVE);
rev->diffopt.stat_width = -1; /* use full terminal width */
rev->abbrev_commit = default_abbrev_commit;
rev->show_root_diff = default_show_root;
rev->subject_prefix = fmt_patch_subject_prefix;
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 @@ -98,7 +98,7 @@ done <<\EOF
ignores expect80 format-patch -1 --stdout
respects expect200 diff HEAD^ HEAD --stat
respects expect200 show --stat
ignores expect80 log -1 --stat
respects expect200 log -1 --stat
EOF

cat >expect <<'EOF'
Expand Down Expand Up @@ -164,7 +164,7 @@ done <<\EOF
ignores expect80 format-patch -1 --stdout
respects expect200 diff HEAD^ HEAD --stat
respects expect200 show --stat
ignores expect80 log -1 --stat
respects expect200 log -1 --stat
EOF

cat >expect <<'EOF'
Expand Down

0 comments on commit 5e0ec15

Please sign in to comment.