[PATCH 0/3] suppress trailing whitespace on empty "notes" lines

STALE1796d

9 messages, 2 authors, 2021-08-30 · open the first message on its own page

[PATCH 0/3] suppress trailing whitespace on empty "notes" lines

From: Eric Sunshine <hidden>
Date: 2021-08-30 07:22:53

This patch series fixes a problem in which `git format-patch --notes`
and `git log` unconditionally indent _all_ "notes" lines, including
those which are empty, which ends up leaving (unwanted) trailing
whitespace on the previously empty lines. The first couple patches
adjust some existing notes-related tests -- which undesirably hard-code
those indented blank notes lines -- to be less brittle since they would
otherwise break by the change made in the final patch which fixes the
actual problem.

Eric Sunshine (3):
  t3301: tolerate minor notes-related presentation changes
  t3303/t9301: make `notes` tests less brittle
  notes: don't indent empty lines

 notes.c                      |   2 +-
 t/t3301-notes.sh             | 321 ++++++++++++++++++-----------------
 t/t3303-notes-subtrees.sh    |  13 +-
 t/t4014-format-patch.sh      |  17 ++
 t/t9301-fast-import-notes.sh |  36 ++--
 5 files changed, 207 insertions(+), 182 deletions(-)

-- 
2.33.0.153.gba50c8fa24

[PATCH 1/3] t3301: tolerate minor notes-related presentation changes

From: Eric Sunshine <hidden>
Date: 2021-08-30 07:22:54

These tests care about whether intended notes-related functionality
occurred and that `git log` presents the notes in the expected fashion
(or, in some cases, that `git log` suppresses the notes). However, the
tests hard-code the precise indentation of notes by the default `git
log` output, which makes them somewhat brittle since they won't be able
to tolerate even minor changes to the presentation. Make the tests a bit
more robust by ignoring indentation.

Signed-off-by: Eric Sunshine <redacted>
---
 t/t3301-notes.sh | 321 ++++++++++++++++++++++++-----------------------
 1 file changed, 162 insertions(+), 159 deletions(-)
diff --git a/t/t3301-notes.sh b/t/t3301-notes.sh
index d742be8840..955b2670a7 100755
--- a/t/t3301-notes.sh
+++ b/t/t3301-notes.sh
@@ -7,6 +7,11 @@ test_description='Test commit notes'
 
 . ./test-lib.sh
 
+lognotes () {
+	git log "$@" >lognotes.out &&
+	sed 's/^[ 	]*//' lognotes.out
+}
+
 write_script fake_editor <<\EOF
 echo "$MSG" >"$1"
 echo "$MSG" >&2
@@ -14,8 +19,6 @@ EOF
 GIT_EDITOR=./fake_editor
 export GIT_EDITOR
 
-indent="    "
-
 test_expect_success 'cannot annotate non-existing HEAD' '
 	test_must_fail env MSG=3 git notes add
 '
@@ -158,14 +161,14 @@ test_expect_success 'show notes' '
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:14:13 2005 -0700
 
-		${indent}2nd
+		2nd
 
 		Notes:
-		${indent}b1
+		b1
 	EOF
 	git cat-file commit HEAD >commits &&
 	! grep b1 commits &&
-	git log -1 >actual &&
+	lognotes -1 >actual &&
 	test_cmp expect actual
 '
 
@@ -178,16 +181,16 @@ test_expect_success 'show multi-line notes' '
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:15:13 2005 -0700
 
-		${indent}3rd
+		3rd
 
 		Notes:
-		${indent}b3
-		${indent}c3c3c3c3
-		${indent}d3d3d3
+		b3
+		c3c3c3c3
+		d3d3d3
 
 	EOF
 	cat expect >>expect-multiline &&
-	git log -2 >actual &&
+	lognotes -2 >actual &&
 	test_cmp expect-multiline actual
 '
 
@@ -201,21 +204,21 @@ test_expect_success 'show -F notes' '
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:16:13 2005 -0700
 
-		${indent}4th
+		4th
 
 		Notes:
-		${indent}xyzzy
+		xyzzy
 
 	EOF
 	cat expect-multiline >>expect-F &&
-	git log -3 >actual &&
+	lognotes -3 >actual &&
 	test_cmp expect-F actual
 '
 
 test_expect_success 'Re-adding -F notes without -f fails' '
 	echo "zyxxy" >note5 &&
 	test_must_fail git notes add -F note5 &&
-	git log -3 >actual &&
+	lognotes -3 >actual &&
 	test_cmp expect-F actual
 '
 
@@ -230,9 +233,9 @@ test_expect_success 'git log --pretty=raw does not show notes' '
 		author A U Thor <author@example.com> 1112912173 -0700
 		committer C O Mitter <committer@example.com> 1112912173 -0700
 
-		${indent}4th
+		4th
 	EOF
-	git log -1 --pretty=raw >actual &&
+	lognotes -1 --pretty=raw >actual &&
 	test_cmp expect actual
 '
 
@@ -240,14 +243,14 @@ test_expect_success 'git log --show-notes' '
 	cat >>expect <<-EOF &&
 
 	Notes:
-	${indent}xyzzy
+	xyzzy
 	EOF
-	git log -1 --pretty=raw --show-notes >actual &&
+	lognotes -1 --pretty=raw --show-notes >actual &&
 	test_cmp expect actual
 '
 
 test_expect_success 'git log --no-notes' '
-	git log -1 --no-notes >actual &&
+	lognotes -1 --no-notes >actual &&
 	! grep xyzzy actual
 '
 
@@ -280,25 +283,25 @@ test_expect_success 'setup alternate notes ref' '
 '
 
 test_expect_success 'git log --notes shows default notes' '
-	git log -1 --notes >actual &&
+	lognotes -1 --notes >actual &&
 	grep xyzzy actual &&
 	! grep alternate actual
 '
 
 test_expect_success 'git log --notes=X shows only X' '
-	git log -1 --notes=alternate >actual &&
+	lognotes -1 --notes=alternate >actual &&
 	! grep xyzzy actual &&
 	grep alternate actual
 '
 
 test_expect_success 'git log --notes --notes=X shows both' '
-	git log -1 --notes --notes=alternate >actual &&
+	lognotes -1 --notes --notes=alternate >actual &&
 	grep xyzzy actual &&
 	grep alternate actual
 '
 
 test_expect_success 'git log --no-notes resets default state' '
-	git log -1 --notes --notes=alternate \
+	lognotes -1 --notes --notes=alternate \
 		--no-notes --notes=alternate \
 		>actual &&
 	! grep xyzzy actual &&
@@ -306,7 +309,7 @@ test_expect_success 'git log --no-notes resets default state' '
 '
 
 test_expect_success 'git log --no-notes resets ref list' '
-	git log -1 --notes --notes=alternate \
+	lognotes -1 --notes --notes=alternate \
 		--no-notes --notes \
 		>actual &&
 	grep xyzzy actual &&
@@ -322,18 +325,18 @@ test_expect_success 'show -m notes' '
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:17:13 2005 -0700
 
-		${indent}5th
+		5th
 
 		Notes:
-		${indent}spam
-		${indent}
-		${indent}foo
-		${indent}bar
-		${indent}baz
+		spam
+
+		foo
+		bar
+		baz
 
 	EOF
 	cat expect-F >>expect-m &&
-	git log -4 >actual &&
+	lognotes -4 >actual &&
 	test_cmp expect-m actual
 '
 
@@ -345,18 +348,18 @@ test_expect_success 'remove note with add -f -F /dev/null' '
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:17:13 2005 -0700
 
-		${indent}5th
+		5th
 
 	EOF
 	cat expect-F >>expect-rm-F &&
-	git log -4 >actual &&
+	lognotes -4 >actual &&
 	test_cmp expect-rm-F actual &&
 	test_must_fail git notes show
 '
 
 test_expect_success 'do not create empty note with -m ""' '
 	git notes add -m "" &&
-	git log -4 >actual &&
+	lognotes -4 >actual &&
 	test_cmp expect-rm-F actual &&
 	test_must_fail git notes show
 '
@@ -390,17 +393,17 @@ test_expect_success 'remove note with "git notes remove"' '
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:17:13 2005 -0700
 
-		${indent}5th
+		5th
 
 		commit $parent
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:16:13 2005 -0700
 
-		${indent}4th
+		4th
 
 	EOF
 	cat expect-multiline >>expect-rm-remove &&
-	git log -4 >actual &&
+	lognotes -4 >actual &&
 	test_cmp expect-rm-remove actual &&
 	test_must_fail git notes show HEAD^
 '
@@ -570,35 +573,35 @@ test_expect_success 'create other note on a different notes ref (setup)' '
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:18:13 2005 -0700
 
-		${indent}6th
+		6th
 	EOF
 	cp expect-not-other expect-other &&
 	cat >>expect-other <<-EOF
 
 		Notes (other):
-		${indent}other note
+		other note
 	EOF
 '
 
 test_expect_success 'Do not show note on other ref by default' '
-	git log -1 >actual &&
+	lognotes -1 >actual &&
 	test_cmp expect-not-other actual
 '
 
 test_expect_success 'Do show note when ref is given in GIT_NOTES_REF' '
-	GIT_NOTES_REF="refs/notes/other" git log -1 >actual &&
+	test_env GIT_NOTES_REF="refs/notes/other" lognotes -1 >actual &&
 	test_cmp expect-other actual
 '
 
 test_expect_success 'Do show note when ref is given in core.notesRef config' '
 	test_config core.notesRef "refs/notes/other" &&
-	git log -1 >actual &&
+	lognotes -1 >actual &&
 	test_cmp expect-other actual
 '
 
 test_expect_success 'Do not show note when core.notesRef is overridden' '
 	test_config core.notesRef "refs/notes/other" &&
-	GIT_NOTES_REF="refs/notes/wrong" git log -1 >actual &&
+	test_env GIT_NOTES_REF="refs/notes/wrong" lognotes -1 >actual &&
 	test_cmp expect-not-other actual
 '
 
@@ -610,36 +613,36 @@ test_expect_success 'Show all notes when notes.displayRef=refs/notes/*' '
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:18:13 2005 -0700
 
-		${indent}6th
+		6th
 
 		Notes:
-		${indent}order test
+		order test
 
 		Notes (other):
-		${indent}other note
+		other note
 
 		commit $parent
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:17:13 2005 -0700
 
-		${indent}5th
+		5th
 
 		Notes:
-		${indent}replacement for deleted note
+		replacement for deleted note
 	EOF
 	GIT_NOTES_REF=refs/notes/commits git notes add \
 		-m"replacement for deleted note" HEAD^ &&
 	GIT_NOTES_REF=refs/notes/commits git notes add -m"order test" &&
 	test_unconfig core.notesRef &&
 	test_config notes.displayRef "refs/notes/*" &&
-	git log -2 >actual &&
+	lognotes -2 >actual &&
 	test_cmp expect-both actual
 '
 
 test_expect_success 'core.notesRef is implicitly in notes.displayRef' '
 	test_config core.notesRef refs/notes/commits &&
 	test_config notes.displayRef refs/notes/other &&
-	git log -2 >actual &&
+	lognotes -2 >actual &&
 	test_cmp expect-both actual
 '
 
@@ -647,7 +650,7 @@ test_expect_success 'notes.displayRef can be given more than once' '
 	test_unconfig core.notesRef &&
 	test_config notes.displayRef refs/notes/commits &&
 	git config --add notes.displayRef refs/notes/other &&
-	git log -2 >actual &&
+	lognotes -2 >actual &&
 	test_cmp expect-both actual
 '
 
@@ -658,17 +661,17 @@ test_expect_success 'notes.displayRef respects order' '
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:18:13 2005 -0700
 
-		${indent}6th
+		6th
 
 		Notes (other):
-		${indent}other note
+		other note
 
 		Notes:
-		${indent}order test
+		order test
 	EOF
 	test_config core.notesRef refs/notes/other &&
 	test_config notes.displayRef refs/notes/commits &&
-	git log -1 >actual &&
+	lognotes -1 >actual &&
 	test_cmp expect-both-reversed actual
 '
 
@@ -678,8 +681,8 @@ test_expect_success 'notes.displayRef with no value handled gracefully' '
 '
 
 test_expect_success 'GIT_NOTES_DISPLAY_REF works' '
-	GIT_NOTES_DISPLAY_REF=refs/notes/commits:refs/notes/other \
-		git log -2 >actual &&
+	test_env GIT_NOTES_DISPLAY_REF=refs/notes/commits:refs/notes/other \
+		lognotes -2 >actual &&
 	test_cmp expect-both actual
 '
 
@@ -691,21 +694,21 @@ test_expect_success 'GIT_NOTES_DISPLAY_REF overrides config' '
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:18:13 2005 -0700
 
-		${indent}6th
+		6th
 
 		commit $parent
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:17:13 2005 -0700
 
-		${indent}5th
+		5th
 	EOF
 	test_config notes.displayRef "refs/notes/*" &&
-	GIT_NOTES_REF= GIT_NOTES_DISPLAY_REF= git log -2 >actual &&
+	test_env GIT_NOTES_REF= GIT_NOTES_DISPLAY_REF= lognotes -2 >actual &&
 	test_cmp expect-none actual
 '
 
 test_expect_success '--show-notes=* adds to GIT_NOTES_DISPLAY_REF' '
-	GIT_NOTES_REF= GIT_NOTES_DISPLAY_REF= git log --show-notes=* -2 >actual &&
+	test_env GIT_NOTES_REF= GIT_NOTES_DISPLAY_REF= lognotes --show-notes=* -2 >actual &&
 	test_cmp expect-both actual
 '
 
@@ -716,24 +719,24 @@ test_expect_success '--no-standard-notes' '
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:18:13 2005 -0700
 
-		${indent}6th
+		6th
 
 		Notes:
-		${indent}order test
+		order test
 	EOF
-	git log --no-standard-notes --show-notes=commits -1 >actual &&
+	lognotes --no-standard-notes --show-notes=commits -1 >actual &&
 	test_cmp expect-commits actual
 '
 
 test_expect_success '--standard-notes' '
 	test_config notes.displayRef "refs/notes/*" &&
-	git log --no-standard-notes --show-notes=commits \
+	lognotes --no-standard-notes --show-notes=commits \
 		--standard-notes -2 >actual &&
 	test_cmp expect-both actual
 '
 
 test_expect_success '--show-notes=ref accumulates' '
-	git log --show-notes=other --show-notes=commits \
+	lognotes --show-notes=other --show-notes=commits \
 		 --no-standard-notes -1 >actual &&
 	test_cmp expect-both-reversed actual
 '
@@ -765,14 +768,14 @@ test_expect_success 'create note from other note with "git notes add -C"' '
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:19:13 2005 -0700
 
-		${indent}7th
+		7th
 
 		Notes:
-		${indent}order test
+		order test
 	EOF
 	note=$(git notes list HEAD^) &&
 	git notes add -C $note &&
-	git log -1 >actual &&
+	lognotes -1 >actual &&
 	test_cmp expect actual &&
 	git notes list HEAD^ >expect &&
 	git notes list HEAD >actual &&
@@ -800,14 +803,14 @@ test_expect_success 'create note from blob with "git notes add -C" reuses blob i
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:20:13 2005 -0700
 
-		${indent}8th
+		8th
 
 		Notes:
-		${indent}This is a blob object
+		This is a blob object
 	EOF
 	echo "This is a blob object" | git hash-object -w --stdin >blob &&
 	git notes add -C $(cat blob) &&
-	git log -1 >actual &&
+	lognotes -1 >actual &&
 	test_cmp expect actual &&
 	git notes list HEAD >actual &&
 	test_cmp blob actual
@@ -821,14 +824,14 @@ test_expect_success 'create note from other note with "git notes add -c"' '
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:21:13 2005 -0700
 
-		${indent}9th
+		9th
 
 		Notes:
-		${indent}yet another note
+		yet another note
 	EOF
 	note=$(git notes list HEAD^^) &&
 	MSG="yet another note" git notes add -c $note &&
-	git log -1 >actual &&
+	lognotes -1 >actual &&
 	test_cmp expect actual
 '
 
@@ -845,16 +848,16 @@ test_expect_success 'append to note from other note with "git notes append -C"'
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:21:13 2005 -0700
 
-		${indent}9th
+		9th
 
 		Notes:
-		${indent}yet another note
-		${indent}
-		${indent}yet another note
+		yet another note
+
+		yet another note
 	EOF
 	note=$(git notes list HEAD^) &&
 	git notes append -C $note HEAD^ &&
-	git log -1 HEAD^ >actual &&
+	lognotes -1 HEAD^ >actual &&
 	test_cmp expect actual
 '
 
@@ -865,14 +868,14 @@ test_expect_success 'create note from other note with "git notes append -c"' '
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:22:13 2005 -0700
 
-		${indent}10th
+		10th
 
 		Notes:
-		${indent}other note
+		other note
 	EOF
 	note=$(git notes list HEAD^) &&
 	MSG="other note" git notes append -c $note &&
-	git log -1 >actual &&
+	lognotes -1 >actual &&
 	test_cmp expect actual
 '
 
@@ -883,16 +886,16 @@ test_expect_success 'append to note from other note with "git notes append -c"'
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:22:13 2005 -0700
 
-		${indent}10th
+		10th
 
 		Notes:
-		${indent}other note
-		${indent}
-		${indent}yet another note
+		other note
+
+		yet another note
 	EOF
 	note=$(git notes list HEAD) &&
 	MSG="yet another note" git notes append -c $note &&
-	git log -1 >actual &&
+	lognotes -1 >actual &&
 	test_cmp expect actual
 '
 
@@ -903,13 +906,13 @@ test_expect_success 'copy note with "git notes copy"' '
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:16:13 2005 -0700
 
-		${indent}4th
+		4th
 
 		Notes:
-		${indent}This is a blob object
+		This is a blob object
 	EOF
 	git notes copy 8th 4th &&
-	git log 3rd..4th >actual &&
+	lognotes 3rd..4th >actual &&
 	test_cmp expect actual &&
 	git notes list 4th >expect &&
 	git notes list 8th >actual &&
@@ -924,15 +927,15 @@ test_expect_success 'copy note with "git notes copy" with default' '
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:23:13 2005 -0700
 
-		${indent}11th
+		11th
 
 		Notes:
-		${indent}other note
-		${indent}
-		${indent}yet another note
+		other note
+
+		yet another note
 	EOF
 	git notes copy HEAD^ &&
-	git log -1 >actual &&
+	lognotes -1 >actual &&
 	test_cmp expect actual &&
 	git notes list HEAD^ >expect &&
 	git notes list HEAD >actual &&
@@ -946,14 +949,14 @@ test_expect_success 'prevent overwrite with "git notes copy"' '
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:23:13 2005 -0700
 
-		${indent}11th
+		11th
 
 		Notes:
-		${indent}other note
-		${indent}
-		${indent}yet another note
+		other note
+
+		yet another note
 	EOF
-	git log -1 >actual &&
+	lognotes -1 >actual &&
 	test_cmp expect actual &&
 	git notes list HEAD^ >expect &&
 	git notes list HEAD >actual &&
@@ -967,13 +970,13 @@ test_expect_success 'allow overwrite with "git notes copy -f"' '
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:23:13 2005 -0700
 
-		${indent}11th
+		11th
 
 		Notes:
-		${indent}This is a blob object
+		This is a blob object
 	EOF
 	git notes copy -f HEAD~3 HEAD &&
-	git log -1 >actual &&
+	lognotes -1 >actual &&
 	test_cmp expect actual &&
 	git notes list HEAD~3 >expect &&
 	git notes list HEAD >actual &&
@@ -987,15 +990,15 @@ test_expect_success 'allow overwrite with "git notes copy -f" with default' '
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:23:13 2005 -0700
 
-		${indent}11th
+		11th
 
 		Notes:
-		${indent}yet another note
-		${indent}
-		${indent}yet another note
+		yet another note
+
+		yet another note
 	EOF
 	git notes copy -f HEAD~2 &&
-	git log -1 >actual &&
+	lognotes -1 >actual &&
 	test_cmp expect actual &&
 	git notes list HEAD~2 >expect &&
 	git notes list HEAD >actual &&
@@ -1016,23 +1019,23 @@ test_expect_success 'git notes copy --stdin' '
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:25:13 2005 -0700
 
-		${indent}13th
+		13th
 
 		Notes:
-		${indent}yet another note
-		${indent}
-		${indent}yet another note
+		yet another note
+
+		yet another note
 
 		commit $parent
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:24:13 2005 -0700
 
-		${indent}12th
+		12th
 
 		Notes:
-		${indent}other note
-		${indent}
-		${indent}yet another note
+		other note
+
+		yet another note
 	EOF
 	from=$(git rev-parse HEAD~3) &&
 	to=$(git rev-parse HEAD^) &&
@@ -1041,7 +1044,7 @@ test_expect_success 'git notes copy --stdin' '
 	to=$(git rev-parse HEAD) &&
 	echo "$from" "$to" >>copy &&
 	git notes copy --stdin <copy &&
-	git log -2 >actual &&
+	lognotes -2 >actual &&
 	test_cmp expect actual &&
 	git notes list HEAD~2 >expect &&
 	git notes list HEAD >actual &&
@@ -1061,13 +1064,13 @@ test_expect_success 'git notes copy --for-rewrite (unconfigured)' '
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:27:13 2005 -0700
 
-		${indent}15th
+		15th
 
 		commit $parent
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:26:13 2005 -0700
 
-		${indent}14th
+		14th
 	EOF
 	from=$(git rev-parse HEAD~3) &&
 	to=$(git rev-parse HEAD^) &&
@@ -1076,7 +1079,7 @@ test_expect_success 'git notes copy --for-rewrite (unconfigured)' '
 	to=$(git rev-parse HEAD) &&
 	echo "$from" "$to" >>copy &&
 	git notes copy --for-rewrite=foo <copy &&
-	git log -2 >actual &&
+	lognotes -2 >actual &&
 	test_cmp expect actual
 '
 
@@ -1088,23 +1091,23 @@ test_expect_success 'git notes copy --for-rewrite (enabled)' '
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:27:13 2005 -0700
 
-		${indent}15th
+		15th
 
 		Notes:
-		${indent}yet another note
-		${indent}
-		${indent}yet another note
+		yet another note
+
+		yet another note
 
 		commit $parent
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:26:13 2005 -0700
 
-		${indent}14th
+		14th
 
 		Notes:
-		${indent}other note
-		${indent}
-		${indent}yet another note
+		other note
+
+		yet another note
 	EOF
 	test_config notes.rewriteMode overwrite &&
 	test_config notes.rewriteRef "refs/notes/*" &&
@@ -1115,7 +1118,7 @@ test_expect_success 'git notes copy --for-rewrite (enabled)' '
 	to=$(git rev-parse HEAD) &&
 	echo "$from" "$to" >>copy &&
 	git notes copy --for-rewrite=foo <copy &&
-	git log -2 >actual &&
+	lognotes -2 >actual &&
 	test_cmp expect actual
 '
 
@@ -1125,7 +1128,7 @@ test_expect_success 'git notes copy --for-rewrite (disabled)' '
 	to=$(git rev-parse HEAD) &&
 	echo "$from" "$to" >copy &&
 	git notes copy --for-rewrite=bar <copy &&
-	git log -2 >actual &&
+	lognotes -2 >actual &&
 	test_cmp expect actual
 '
 
@@ -1136,10 +1139,10 @@ test_expect_success 'git notes copy --for-rewrite (overwrite)' '
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:27:13 2005 -0700
 
-		${indent}15th
+		15th
 
 		Notes:
-		${indent}a fresh note
+		a fresh note
 	EOF
 	git notes add -f -m"a fresh note" HEAD^ &&
 	test_config notes.rewriteMode overwrite &&
@@ -1148,7 +1151,7 @@ test_expect_success 'git notes copy --for-rewrite (overwrite)' '
 	to=$(git rev-parse HEAD) &&
 	echo "$from" "$to" >copy &&
 	git notes copy --for-rewrite=foo <copy &&
-	git log -1 >actual &&
+	lognotes -1 >actual &&
 	test_cmp expect actual
 '
 
@@ -1159,7 +1162,7 @@ test_expect_success 'git notes copy --for-rewrite (ignore)' '
 	to=$(git rev-parse HEAD) &&
 	echo "$from" "$to" >copy &&
 	git notes copy --for-rewrite=foo <copy &&
-	git log -1 >actual &&
+	lognotes -1 >actual &&
 	test_cmp expect actual
 '
 
@@ -1170,12 +1173,12 @@ test_expect_success 'git notes copy --for-rewrite (append)' '
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:27:13 2005 -0700
 
-		${indent}15th
+		15th
 
 		Notes:
-		${indent}a fresh note
-		${indent}
-		${indent}another fresh note
+		a fresh note
+
+		another fresh note
 	EOF
 	git notes add -f -m"another fresh note" HEAD^ &&
 	test_config notes.rewriteMode concatenate &&
@@ -1184,7 +1187,7 @@ test_expect_success 'git notes copy --for-rewrite (append)' '
 	to=$(git rev-parse HEAD) &&
 	echo "$from" "$to" >copy &&
 	git notes copy --for-rewrite=foo <copy &&
-	git log -1 >actual &&
+	lognotes -1 >actual &&
 	test_cmp expect actual
 '
 
@@ -1195,16 +1198,16 @@ test_expect_success 'git notes copy --for-rewrite (append two to one)' '
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:27:13 2005 -0700
 
-		${indent}15th
+		15th
 
 		Notes:
-		${indent}a fresh note
-		${indent}
-		${indent}another fresh note
-		${indent}
-		${indent}append 1
-		${indent}
-		${indent}append 2
+		a fresh note
+
+		another fresh note
+
+		append 1
+
+		append 2
 	EOF
 	git notes add -f -m"append 1" HEAD^ &&
 	git notes add -f -m"append 2" HEAD^^ &&
@@ -1217,7 +1220,7 @@ test_expect_success 'git notes copy --for-rewrite (append two to one)' '
 	to=$(git rev-parse HEAD) &&
 	echo "$from" "$to" >>copy &&
 	git notes copy --for-rewrite=foo <copy &&
-	git log -1 >actual &&
+	lognotes -1 >actual &&
 	test_cmp expect actual
 '
 
@@ -1229,7 +1232,7 @@ test_expect_success 'git notes copy --for-rewrite (append empty)' '
 	to=$(git rev-parse HEAD) &&
 	echo "$from" "$to" >copy &&
 	git notes copy --for-rewrite=foo <copy &&
-	git log -1 >actual &&
+	lognotes -1 >actual &&
 	test_cmp expect actual
 '
 
@@ -1240,10 +1243,10 @@ test_expect_success 'GIT_NOTES_REWRITE_MODE works' '
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:27:13 2005 -0700
 
-		${indent}15th
+		15th
 
 		Notes:
-		${indent}replacement note 1
+		replacement note 1
 	EOF
 	test_config notes.rewriteMode concatenate &&
 	test_config notes.rewriteRef "refs/notes/*" &&
@@ -1252,7 +1255,7 @@ test_expect_success 'GIT_NOTES_REWRITE_MODE works' '
 	to=$(git rev-parse HEAD) &&
 	echo "$from" "$to" >copy &&
 	GIT_NOTES_REWRITE_MODE=overwrite git notes copy --for-rewrite=foo <copy &&
-	git log -1 >actual &&
+	lognotes -1 >actual &&
 	test_cmp expect actual
 '
 
@@ -1263,10 +1266,10 @@ test_expect_success 'GIT_NOTES_REWRITE_REF works' '
 		Author: A U Thor <author@example.com>
 		Date:   Thu Apr 7 15:27:13 2005 -0700
 
-		${indent}15th
+		15th
 
 		Notes:
-		${indent}replacement note 2
+		replacement note 2
 	EOF
 	git notes add -f -m"replacement note 2" HEAD^ &&
 	test_config notes.rewriteMode overwrite &&
@@ -1276,7 +1279,7 @@ test_expect_success 'GIT_NOTES_REWRITE_REF works' '
 	echo "$from" "$to" >copy &&
 	GIT_NOTES_REWRITE_REF=refs/notes/commits:refs/notes/other \
 		git notes copy --for-rewrite=foo <copy &&
-	git log -1 >actual &&
+	lognotes -1 >actual &&
 	test_cmp expect actual
 '
 
@@ -1289,7 +1292,7 @@ test_expect_success 'GIT_NOTES_REWRITE_REF overrides config' '
 	echo "$from" "$to" >copy &&
 	GIT_NOTES_REWRITE_REF=refs/notes/commits \
 		git notes copy --for-rewrite=foo <copy &&
-	git log -1 >actual &&
+	lognotes -1 >actual &&
 	grep "replacement note 3" actual
 '
 
@@ -1372,13 +1375,13 @@ EOF
 
 test_expect_success 'empty notes are displayed by git log' '
 	test_commit 17th &&
-	git log -1 >expect &&
+	lognotes -1 >expect &&
 	cat >>expect <<-EOF &&
 
 		Notes:
 	EOF
 	git notes add -C "$empty_blob" --allow-empty &&
-	git log -1 >actual &&
+	lognotes -1 >actual &&
 	test_cmp expect actual
 '
 
-- 
2.33.0.153.gba50c8fa24

[PATCH 2/3] t3303/t9301: make `notes` tests less brittle

From: Eric Sunshine <hidden>
Date: 2021-08-30 07:22:55

These tests care about whether intended notes-related functionality
occurred, but they check for the expected result in a brittle way by
consulting the default output of `git log` which is intended for human,
not machine, consumption. Make the tests more robust by requesting the
desired information in a stable machine-consumable format.

Signed-off-by: Eric Sunshine <redacted>
---
 t/t3303-notes-subtrees.sh    | 13 ++++++++-----
 t/t9301-fast-import-notes.sh | 36 +++++++++++++++++++-----------------
 2 files changed, 27 insertions(+), 22 deletions(-)
diff --git a/t/t3303-notes-subtrees.sh b/t/t3303-notes-subtrees.sh
index d47ce00f69..abffa10564 100755
--- a/t/t3303-notes-subtrees.sh
+++ b/t/t3303-notes-subtrees.sh
@@ -171,13 +171,16 @@ INPUT_END
 }
 
 verify_concatenated_notes () {
-	git log | grep "^    " > output &&
+	git log --format="tformat:%B%N" >output &&
 	i=$number_of_commits &&
 	while [ $i -gt 0 ]; do
-		echo "    commit #$i" &&
-		echo "    first note for commit #$i" &&
-		echo "    " &&
-		echo "    second note for commit #$i" &&
+		cat <<-EOF &&
+		commit #$i
+		first note for commit #$i
+
+		second note for commit #$i
+
+		EOF
 		i=$(($i-1));
 	done > expect &&
 	test_cmp expect output
diff --git a/t/t9301-fast-import-notes.sh b/t/t9301-fast-import-notes.sh
index 1ae4d7c0d3..123323b2bb 100755
--- a/t/t9301-fast-import-notes.sh
+++ b/t/t9301-fast-import-notes.sh
@@ -259,29 +259,31 @@ EOF
 
 INPUT_END
 
-whitespace="    "
-
 cat >expect <<EXPECT_END
-    fourth commit
-    pre-prefix of note for fourth commit
-$whitespace
-    prefix of note for fourth commit
-$whitespace
-    third note for fourth commit
-    third commit
-    prefix of note for third commit
-$whitespace
-    third note for third commit
-    second commit
-    third note for second commit
-    first commit
-    third note for first commit
+fourth commit
+pre-prefix of note for fourth commit
+
+prefix of note for fourth commit
+
+third note for fourth commit
+
+third commit
+prefix of note for third commit
+
+third note for third commit
+
+second commit
+third note for second commit
+
+first commit
+third note for first commit
+
 EXPECT_END
 
 test_expect_success 'add concatenation notes with M command' '
 
 	git fast-import <input &&
-	GIT_NOTES_REF=refs/notes/test git log | grep "^    " > actual &&
+	GIT_NOTES_REF=refs/notes/test git log --format="tformat:%B%N" >actual &&
 	test_cmp expect actual
 
 '
-- 
2.33.0.153.gba50c8fa24

[PATCH 3/3] notes: don't indent empty lines

From: Eric Sunshine <hidden>
Date: 2021-08-30 07:22:58

Like other Git commands, `git notes` takes care to call `stripspace` on
the user-supplied note content, thereby ensuring that it has no trailing
whitespace, among other cleanups. However, when notes are inserted into
a patch via `git format-patch --notes`, all lines of the note are
indented unconditionally, including empty lines, which leaves trailing
whitespace on lines which previously were empty, thus negating the
normalization done earlier. Fix this shortcoming.

Signed-off-by: Eric Sunshine <redacted>
---
 notes.c                 |  2 +-
 t/t4014-format-patch.sh | 17 +++++++++++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/notes.c b/notes.c
index f87dac4068..25e0a59899 100644
--- a/notes.c
+++ b/notes.c
@@ -1295,7 +1295,7 @@ static void format_note(struct notes_tree *t, const struct object_id *object_oid
 	for (msg_p = msg; msg_p < msg + msglen; msg_p += linelen + 1) {
 		linelen = strchrnul(msg_p, '\n') - msg_p;
 
-		if (!raw)
+		if (!raw && linelen)
 			strbuf_addstr(sb, "    ");
 		strbuf_add(sb, msg_p, linelen);
 		strbuf_addch(sb, '\n');
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
index 712d4b5ddf..7406e5fe99 100755
--- a/t/t4014-format-patch.sh
+++ b/t/t4014-format-patch.sh
@@ -906,6 +906,23 @@ test_expect_success 'format-patch with multiple notes refs in config' '
 	grep "this is note 2" out
 '
 
+test_expect_success 'format-patch --notes does not indent empty lines' '
+	git notes add --file=- HEAD <<-\EOF &&
+	paragraph 1
+
+	paragraph 2
+	EOF
+	test_when_finished "git notes remove HEAD" &&
+	git format-patch -1 --stdout --notes >out &&
+	sed -n "/^[ 	]*paragraph 1$/,/^[ 	]*paragraph 2$/{s/^[ 	][ 	]*/[indent]/;p;}" out >actual &&
+	cat >expect <<-\EOF &&
+	[indent]paragraph 1
+
+	[indent]paragraph 2
+	EOF
+	test_cmp expect actual
+'
+
 echo "fatal: --name-only does not make sense" >expect.name-only
 echo "fatal: --name-status does not make sense" >expect.name-status
 echo "fatal: --check does not make sense" >expect.check
-- 
2.33.0.153.gba50c8fa24

[RFC PATCH v2 0/2] suppress trailing whitespace on empty "notes" lines

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2021-08-30 10:47:25

This is a review of Eric Sunshin's
[off-list ref] series.

Side note:

    I'm generally trying to see if just sending a "proposed vX" is
    more productive for everyone than patch feedback effectively
    describing it in prose. I don't mean for this thing to be picked
    up as-is by Junio without the consent of the submitter, and don't
    have any desire to "pick up" the series myself.

    My review workflow is just applying the patches locally, fiddling
    with them, so it seems like the most straightforward and helpful
    thing to send the result of that local end-state, rather than
    describing the changes I made in prose, and expect the original
    submitter to reverse engineer that state if they're interested in
    trying it out locally themselves.

I really like the end goal of
[off-list ref] series, but this
seems like a more straightforward way to get to that goal.

I.e. the original 1/3 and 2/3 starts out by making the tests
whitespace-independent. If we just skip that 1/3, and then in 3/3
tweak the relevant failing tests for the code change we won't even
need a new test, all the existing tests previously made
whitespace-independent in 1/3 will assert this new behavior.

Eric Sunshine (2):
  t3303/t9301: make `notes` tests less brittle
  notes: don't indent empty lines

 notes.c                      |  2 +-
 t/t3301-notes.sh             | 28 ++++++++++++++--------------
 t/t3303-notes-subtrees.sh    | 13 ++++++++-----
 t/t9301-fast-import-notes.sh | 36 +++++++++++++++++++-----------------
 4 files changed, 42 insertions(+), 37 deletions(-)

Range-diff against v1:
1:  d2915b20aee < -:  ----------- t3301: tolerate minor notes-related presentation changes
2:  478d8b8d104 ! 1:  5a1ddd30859 t3303/t9301: make `notes` tests less brittle
    @@ Commit message
         desired information in a stable machine-consumable format.
     
         Signed-off-by: Eric Sunshine [off-list ref]
    +    Signed-off-by: Ævar Arnfjörð Bjarmason [off-list ref]
     
      ## t/t3303-notes-subtrees.sh ##
     @@ t/t3303-notes-subtrees.sh: INPUT_END
3:  56d05862a67 < -:  ----------- notes: don't indent empty lines
-:  ----------- > 2:  4b546b83fd7 notes: don't indent empty lines
-- 
2.33.0.737.g0eefde7d76

[RFC PATCH v2 1/2] t3303/t9301: make `notes` tests less brittle

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2021-08-30 10:47:26

From: Eric Sunshine <redacted>

These tests care about whether intended notes-related functionality
occurred, but they check for the expected result in a brittle way by
consulting the default output of `git log` which is intended for human,
not machine, consumption. Make the tests more robust by requesting the
desired information in a stable machine-consumable format.

Signed-off-by: Eric Sunshine <redacted>
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
---
 t/t3303-notes-subtrees.sh    | 13 ++++++++-----
 t/t9301-fast-import-notes.sh | 36 +++++++++++++++++++-----------------
 2 files changed, 27 insertions(+), 22 deletions(-)
diff --git a/t/t3303-notes-subtrees.sh b/t/t3303-notes-subtrees.sh
index d47ce00f694..abffa105645 100755
--- a/t/t3303-notes-subtrees.sh
+++ b/t/t3303-notes-subtrees.sh
@@ -171,13 +171,16 @@ INPUT_END
 }
 
 verify_concatenated_notes () {
-	git log | grep "^    " > output &&
+	git log --format="tformat:%B%N" >output &&
 	i=$number_of_commits &&
 	while [ $i -gt 0 ]; do
-		echo "    commit #$i" &&
-		echo "    first note for commit #$i" &&
-		echo "    " &&
-		echo "    second note for commit #$i" &&
+		cat <<-EOF &&
+		commit #$i
+		first note for commit #$i
+
+		second note for commit #$i
+
+		EOF
 		i=$(($i-1));
 	done > expect &&
 	test_cmp expect output
diff --git a/t/t9301-fast-import-notes.sh b/t/t9301-fast-import-notes.sh
index 1ae4d7c0d37..123323b2bbb 100755
--- a/t/t9301-fast-import-notes.sh
+++ b/t/t9301-fast-import-notes.sh
@@ -259,29 +259,31 @@ EOF
 
 INPUT_END
 
-whitespace="    "
-
 cat >expect <<EXPECT_END
-    fourth commit
-    pre-prefix of note for fourth commit
-$whitespace
-    prefix of note for fourth commit
-$whitespace
-    third note for fourth commit
-    third commit
-    prefix of note for third commit
-$whitespace
-    third note for third commit
-    second commit
-    third note for second commit
-    first commit
-    third note for first commit
+fourth commit
+pre-prefix of note for fourth commit
+
+prefix of note for fourth commit
+
+third note for fourth commit
+
+third commit
+prefix of note for third commit
+
+third note for third commit
+
+second commit
+third note for second commit
+
+first commit
+third note for first commit
+
 EXPECT_END
 
 test_expect_success 'add concatenation notes with M command' '
 
 	git fast-import <input &&
-	GIT_NOTES_REF=refs/notes/test git log | grep "^    " > actual &&
+	GIT_NOTES_REF=refs/notes/test git log --format="tformat:%B%N" >actual &&
 	test_cmp expect actual
 
 '
-- 
2.33.0.737.g0eefde7d76

[RFC PATCH v2 2/2] notes: don't indent empty lines

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2021-08-30 10:47:28

From: Eric Sunshine <redacted>

Like other Git commands, `git notes` takes care to call `stripspace` on
the user-supplied note content, thereby ensuring that it has no trailing
whitespace, among other cleanups. However, when notes are inserted into
a patch via `git format-patch --notes`, all lines of the note are
indented unconditionally, including empty lines, which leaves trailing
whitespace on lines which previously were empty, thus negating the
normalization done earlier. Fix this shortcoming.

Signed-off-by: Eric Sunshine <redacted>
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
---
 notes.c          |  2 +-
 t/t3301-notes.sh | 28 ++++++++++++++--------------
 2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/notes.c b/notes.c
index f87dac40684..25e0a598996 100644
--- a/notes.c
+++ b/notes.c
@@ -1295,7 +1295,7 @@ static void format_note(struct notes_tree *t, const struct object_id *object_oid
 	for (msg_p = msg; msg_p < msg + msglen; msg_p += linelen + 1) {
 		linelen = strchrnul(msg_p, '\n') - msg_p;
 
-		if (!raw)
+		if (!raw && linelen)
 			strbuf_addstr(sb, "    ");
 		strbuf_add(sb, msg_p, linelen);
 		strbuf_addch(sb, '\n');
diff --git a/t/t3301-notes.sh b/t/t3301-notes.sh
index d742be88402..74e5bfbc863 100755
--- a/t/t3301-notes.sh
+++ b/t/t3301-notes.sh
@@ -326,7 +326,7 @@ test_expect_success 'show -m notes' '
 
 		Notes:
 		${indent}spam
-		${indent}
+
 		${indent}foo
 		${indent}bar
 		${indent}baz
@@ -849,7 +849,7 @@ test_expect_success 'append to note from other note with "git notes append -C"'
 
 		Notes:
 		${indent}yet another note
-		${indent}
+
 		${indent}yet another note
 	EOF
 	note=$(git notes list HEAD^) &&
@@ -887,7 +887,7 @@ test_expect_success 'append to note from other note with "git notes append -c"'
 
 		Notes:
 		${indent}other note
-		${indent}
+
 		${indent}yet another note
 	EOF
 	note=$(git notes list HEAD) &&
@@ -928,7 +928,7 @@ test_expect_success 'copy note with "git notes copy" with default' '
 
 		Notes:
 		${indent}other note
-		${indent}
+
 		${indent}yet another note
 	EOF
 	git notes copy HEAD^ &&
@@ -950,7 +950,7 @@ test_expect_success 'prevent overwrite with "git notes copy"' '
 
 		Notes:
 		${indent}other note
-		${indent}
+
 		${indent}yet another note
 	EOF
 	git log -1 >actual &&
@@ -991,7 +991,7 @@ test_expect_success 'allow overwrite with "git notes copy -f" with default' '
 
 		Notes:
 		${indent}yet another note
-		${indent}
+
 		${indent}yet another note
 	EOF
 	git notes copy -f HEAD~2 &&
@@ -1020,7 +1020,7 @@ test_expect_success 'git notes copy --stdin' '
 
 		Notes:
 		${indent}yet another note
-		${indent}
+
 		${indent}yet another note
 
 		commit $parent
@@ -1031,7 +1031,7 @@ test_expect_success 'git notes copy --stdin' '
 
 		Notes:
 		${indent}other note
-		${indent}
+
 		${indent}yet another note
 	EOF
 	from=$(git rev-parse HEAD~3) &&
@@ -1092,7 +1092,7 @@ test_expect_success 'git notes copy --for-rewrite (enabled)' '
 
 		Notes:
 		${indent}yet another note
-		${indent}
+
 		${indent}yet another note
 
 		commit $parent
@@ -1103,7 +1103,7 @@ test_expect_success 'git notes copy --for-rewrite (enabled)' '
 
 		Notes:
 		${indent}other note
-		${indent}
+
 		${indent}yet another note
 	EOF
 	test_config notes.rewriteMode overwrite &&
@@ -1174,7 +1174,7 @@ test_expect_success 'git notes copy --for-rewrite (append)' '
 
 		Notes:
 		${indent}a fresh note
-		${indent}
+
 		${indent}another fresh note
 	EOF
 	git notes add -f -m"another fresh note" HEAD^ &&
@@ -1199,11 +1199,11 @@ test_expect_success 'git notes copy --for-rewrite (append two to one)' '
 
 		Notes:
 		${indent}a fresh note
-		${indent}
+
 		${indent}another fresh note
-		${indent}
+
 		${indent}append 1
-		${indent}
+
 		${indent}append 2
 	EOF
 	git notes add -f -m"append 1" HEAD^ &&
-- 
2.33.0.737.g0eefde7d76

Re: [RFC PATCH v2 0/2] suppress trailing whitespace on empty "notes" lines

From: Eric Sunshine <hidden>
Date: 2021-08-30 16:45:22

On Mon, Aug 30, 2021 at 6:47 AM Ævar Arnfjörð Bjarmason
[off-list ref] wrote:
Side note:

    I'm generally trying to see if just sending a "proposed vX" is
    more productive for everyone than patch feedback effectively
    describing it in prose. I don't mean for this thing to be picked
    up as-is by Junio without the consent of the submitter, and don't
    have any desire to "pick up" the series myself.

I really like the end goal of
[off-list ref] series, but this
seems like a more straightforward way to get to that goal.

I.e. the original 1/3 and 2/3 starts out by making the tests
whitespace-independent. If we just skip that 1/3, and then in 3/3
tweak the relevant failing tests for the code change we won't even
need a new test, all the existing tests previously made
whitespace-independent in 1/3 will assert this new behavior.
It probably won't surprise you that this fix to `notes` started out as
a single patch which made the change to `notes.c` and adjusted the
existing tests to account for it. In particular, my original changes
to t3301 were exactly the same changes you made (i.e. merely dropping
the empty-line `${indent}` from the few necessary places). I wasn't
happy about the additional complexity I had to add to t3303 and t9301
to continue plucking the notes out of the default git-log output, thus
simplified by making those tests less brittle. That, of course,
deserved its own patch. I wavered quite a bit about whether to make
t3301 less brittle too, or to simply apply the minimal changes which I
had already made (and which you made independently). Eventually, I
decided to split that out as a brittle-fixing patch, as well, to
better future-proof it, but perhaps that's terribly important.

I don't have strong feelings between my v1 and your v2 of this series,
and would be happy to see Junio pick up either version.

Re: [RFC PATCH v2 0/2] suppress trailing whitespace on empty "notes" lines

From: Eric Sunshine <hidden>
Date: 2021-08-30 16:50:15

On Mon, Aug 30, 2021 at 12:45 PM Eric Sunshine [off-list ref] wrote:
It probably won't surprise you that this fix to `notes` started out as
a single patch which made the change to `notes.c` and adjusted the
existing tests to account for it. In particular, my original changes
to t3301 were exactly the same changes you made (i.e. merely dropping
the empty-line `${indent}` from the few necessary places). I wasn't
happy about the additional complexity I had to add to t3303 and t9301
to continue plucking the notes out of the default git-log output, thus
simplified by making those tests less brittle. That, of course,
deserved its own patch. I wavered quite a bit about whether to make
t3301 less brittle too, or to simply apply the minimal changes which I
had already made (and which you made independently). Eventually, I
decided to split that out as a brittle-fixing patch, as well, to
better future-proof it, but perhaps that's terribly important.
...that's NOT terribly important.

(last-second editing mistake strikes again)
I don't have strong feelings between my v1 and your v2 of this series,
and would be happy to see Junio pick up either version.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help