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

[PATCH v3 0/2] wrap format-patch diffstats around 72 columns

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Feb 1, 2018, 12:47 UTC
Message-ID
<20180201124750.15032-1-pclouds@gmail.com>
In-Reply-To
<20180125115927.16196-1-pclouds@gmail.com>
v3 fixes tests in 2/2 that I overlooked (but Jeff didn't). Interdiff:
diff --git a/t/t4052-stat-output.sh b/t/t4052-stat-output.sh
index 1e62333b46..6e2cf933f7 100755
--- a/t/t4052-stat-output.sh
+++ b/t/t4052-stat-output.sh
@@ -19,17 +19,33 @@ test_expect_success 'preparation' '
 	git commit -m message "$name"
 '
 
+cat >expect72 <<-'EOF'
+ ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1 +
+EOF
+test_expect_success "format-patch: small change with long name gives more space to the name" '
+	git format-patch -1 --stdout >output &&
+	grep " | " output >actual &&
+	test_cmp expect72 actual
+'
+
 while read cmd args
 do
-	cat >expect <<-'EOF'
+	cat >expect80 <<-'EOF'
 	 ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1 +
 	EOF
 	test_expect_success "$cmd: small change with long name gives more space to the name" '
 		git $cmd $args >output &&
 		grep " | " output >actual &&
-		test_cmp expect actual
+		test_cmp expect80 actual
 	'
+done <<\EOF
+diff HEAD^ HEAD --stat
+show --stat
+log -1 --stat
+EOF
 
+while read cmd args
+do
 	cat >expect <<-'EOF'
 	 ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1 +
 	EOF
@@ -60,7 +76,7 @@ do
 		test_cmp expect actual
 	'
 done <<\EOF
-format-patch --stat=80 -1 --stdout
+format-patch -1 --stdout
 diff HEAD^ HEAD --stat
 show --stat
 log -1 --stat


Nguyễn Thái Ngọc Duy (2):
  format-patch: keep cover-letter diffstat wrapped in 72 columns
  format-patch: reduce patch diffstat width to 72

 builtin/log.c          |  7 ++++++-
 t/t4052-stat-output.sh | 46 ++++++++++++++++++++++++++++--------------
 2 files changed, 37 insertions(+), 16 deletions(-)
-- 
2.16.1.205.g271f633410
Previous: Jeff KingNext: Nguyễn Thái Ngọc Duy
Message 14 of 17 in “format-patch: set diffstat width to 70 instead of default 80”
  1. format-patch: set diffstat width to 70 instead of default 80Nguyễn Thái Ngọc Duy, Jan 22, 2018
  2. Junio C HamanoJan 22, 2018
  3. Jeff KingJan 22, 2018
  4. Ævar Arnfjörð BjarmasonJan 23, 2018
  5. Jeff KingJan 23, 2018
  6. Duy NguyenJan 23, 2018
  7. Ævar Arnfjörð BjarmasonJan 23, 2018
  8. 0/2 wrap format-patch diffstats around 72 columnsNguyễn Thái Ngọc Duy, Jan 25, 2018
  9. 1/2 format-patch: keep cover-letter diffstat wrapped in 72 columnsNguyễn Thái Ngọc Duy, Jan 25, 2018
  10. 2/2 format-patch: reduce patch diffstat width to 72Nguyễn Thái Ngọc Duy, Jan 25, 2018
  11. Jeff KingJan 27, 2018
  12. Duy NguyenJan 30, 2018
  13. Jeff KingJan 27, 2018
  14. 0/2 wrap format-patch diffstats around 72 columnsNguyễn Thái Ngọc Duy, Feb 1, 2018
  15. 1/2 format-patch: keep cover-letter diffstat wrapped in 72 columnsNguyễn Thái Ngọc Duy, Feb 1, 2018
  16. 2/2 format-patch: reduce patch diffstat width to 72Nguyễn Thái Ngọc Duy, Feb 1, 2018
  17. Junio C HamanoFeb 2, 2018

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.