git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v7a 4/9] log --stat: use the full terminal width

From
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Date
Mar 1, 2012, 12:26 UTC
Message-ID
<1330604806-30288-4-git-send-email-zbyszek@in.waw.pl>
In-Reply-To
<1330604806-30288-1-git-send-email-zbyszek@in.waw.pl>

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>
---
 builtin/log.c          |    1 +
 t/t4052-stat-output.sh |    4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/builtin/log.c b/builtin/log.c
index d37ae26..075a427 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -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;
diff --git a/t/t4052-stat-output.sh b/t/t4052-stat-output.sh
index 56d3899..f81d427 100755
--- a/t/t4052-stat-output.sh
+++ b/t/t4052-stat-output.sh
@@ -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'
@@ -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'
-- 
1.7.9.2.399.gdf4d.dirty
Previous: Zbigniew Jędrzejewski-SzmekNext: Zbigniew Jędrzejewski-Szmek
Message 11 of 23 in “Incremental updates to What's cooking”
  1. Junio C HamanoFeb 28, 2012
  2. Zbigniew Jędrzejewski-SzmekFeb 29, 2012
  3. Junio C HamanoFeb 29, 2012
  4. Zbigniew Jędrzejewski-SzmekFeb 29, 2012
  5. Junio C HamanoFeb 29, 2012
  6. Zbigniew Jędrzejewski-SzmekFeb 29, 2012
  7. Junio C HamanoFeb 29, 2012
  8. 1/9 diff --stat: tests for long filenames and big change countsZbigniew Jędrzejewski-Szmek, Mar 1, 2012
  9. 2/9 diff --stat: use the full terminal widthZbigniew Jędrzejewski-Szmek, Mar 1, 2012
  10. 3/9 show --stat: use the full terminal widthZbigniew Jędrzejewski-Szmek, Mar 1, 2012
  11. 4/9 log --stat: use the full terminal widthZbigniew Jędrzejewski-Szmek, Mar 1, 2012
  12. 5/9 merge --stat: use the full terminal widthZbigniew Jędrzejewski-Szmek, Mar 1, 2012
  13. 6/9 diff --stat: use a maximum of 5/8 for the filename partZbigniew Jędrzejewski-Szmek, Mar 1, 2012
  14. Junio C HamanoMar 1, 2012
  15. Jeff KingMar 26, 2012
  16. t4052: unset $COLUMNS inherited from environmentZbigniew Jędrzejewski-Szmek, Mar 27, 2012
  17. Jeff KingMar 27, 2012
  18. tests: unset COLUMNS inherited from environmentZbigniew Jędrzejewski-Szmek, Mar 27, 2012
  19. Jeff KingMar 27, 2012
  20. Johannes SixtMar 27, 2012
  21. 7/9 diff --stat: add a test for output with COLUMNS=40Zbigniew Jędrzejewski-Szmek, Mar 1, 2012
  22. 8/9 diff --stat: enable limiting of the graph partZbigniew Jędrzejewski-Szmek, Mar 1, 2012
  23. 9/9 diff --stat: add config option to limit graph widthZbigniew Jędrzejewski-Szmek, Mar 1, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.