Skip to content

Commit 5e0ec15

Browse files
keszybzgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 666c92a commit 5e0ec15

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

builtin/log.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ static void cmd_log_init_defaults(struct rev_info *rev)
7777
get_commit_format(fmt_pretty, rev);
7878
rev->verbose_header = 1;
7979
DIFF_OPT_SET(&rev->diffopt, RECURSIVE);
80+
rev->diffopt.stat_width = -1; /* use full terminal width */
8081
rev->abbrev_commit = default_abbrev_commit;
8182
rev->show_root_diff = default_show_root;
8283
rev->subject_prefix = fmt_patch_subject_prefix;

t/t4052-stat-output.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ done <<\EOF
9898
ignores expect80 format-patch -1 --stdout
9999
respects expect200 diff HEAD^ HEAD --stat
100100
respects expect200 show --stat
101-
ignores expect80 log -1 --stat
101+
respects expect200 log -1 --stat
102102
EOF
103103

104104
cat >expect <<'EOF'
@@ -164,7 +164,7 @@ done <<\EOF
164164
ignores expect80 format-patch -1 --stdout
165165
respects expect200 diff HEAD^ HEAD --stat
166166
respects expect200 show --stat
167-
ignores expect80 log -1 --stat
167+
respects expect200 log -1 --stat
168168
EOF
169169

170170
cat >expect <<'EOF'

0 commit comments

Comments
 (0)