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

[PATCH v4 05/27] t3301: stop losing return codes of git commands

From
Denton Liu <liu.denton@gmail.com>
Date
Nov 26, 2019, 01:17 UTC
Message-ID
<df6b3393c4b100fd1c490d4bfe0844a83368809a.1574731022.git.liu.denton@gmail.com>
In-Reply-To
<cover.1574731022.git.liu.denton@gmail.com>

Currently, there are two ways where the return codes of git commands are lost. The first way is when a command is in the upstream of a pipe. In a pipe, only the return code of the last command is used. Thus, all other commands will have their return codes masked. Rewrite pipes so that there are no git commands upstream.

The other way is when a command is in a non-assignment command substitution. The return code will be lost in favour of the surrounding command's. Rewrite instances of this so that git commands are either run on their own or in an assignment-only command substitution.

This patch fixes a real buggy test: in 'copy note with "git notes copy"', `git notes` was mistyped as `git note`.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
---
 t/t3301-notes.sh | 230 +++++++++++++++++++++++++++++++++--------------
 1 file changed, 163 insertions(+), 67 deletions(-)
diff --git a/t/t3301-notes.sh b/t/t3301-notes.sh
index d66a5f6faa..8f43303007 100755
--- a/t/t3301-notes.sh
+++ b/t/t3301-notes.sh
@@ -54,7 +54,9 @@ test_expect_success 'create notes' '
 	test_path_is_missing .git/NOTES_EDITMSG &&
 	git ls-tree -r refs/notes/commits >actual &&
 	test_line_count = 1 actual &&
-	test "b4" = "$(git notes show)" &&
+	echo b4 >expect &&
+	git notes show >actual &&
+	test_cmp expect actual &&
 	git show HEAD^ &&
 	test_must_fail git notes show HEAD^
 '
@@ -79,14 +81,21 @@ test_expect_success 'edit existing notes' '
 	test_path_is_missing .git/NOTES_EDITMSG &&
 	git ls-tree -r refs/notes/commits >actual &&
 	test_line_count = 1 actual &&
-	test "b3" = "$(git notes show)" &&
+	echo b3 >expect &&
+	git notes show >actual &&
+	test_cmp expect actual &&
 	git show HEAD^ &&
 	test_must_fail git notes show HEAD^
 '
 
 test_expect_success 'show notes from treeish' '
-	test "b3" = "$(git notes --ref commits^{tree} show)" &&
-	test "b4" = "$(git notes --ref commits@{1} show)"
+	echo b3 >expect &&
+	git notes --ref commits^{tree} show >actual &&
+	test_cmp expect actual &&
+
+	echo b4 >expect &&
+	git notes --ref commits@{1} show >actual &&
+	test_cmp expect actual
 '
 
 test_expect_success 'cannot edit notes from non-ref' '
@@ -99,7 +108,9 @@ test_expect_success 'cannot "git notes add -m" where notes already exists' '
 	test_path_is_missing .git/NOTES_EDITMSG &&
 	git ls-tree -r refs/notes/commits >actual &&
 	test_line_count = 1 actual &&
-	test "b3" = "$(git notes show)" &&
+	echo b3 >expect &&
+	git notes show >actual &&
+	test_cmp expect actual &&
 	git show HEAD^ &&
 	test_must_fail git notes show HEAD^
 '
@@ -109,7 +120,9 @@ test_expect_success 'can overwrite existing note with "git notes add -f -m"' '
 	test_path_is_missing .git/NOTES_EDITMSG &&
 	git ls-tree -r refs/notes/commits >actual &&
 	test_line_count = 1 actual &&
-	test "b1" = "$(git notes show)" &&
+	echo b1 >expect &&
+	git notes show >actual &&
+	test_cmp expect actual &&
 	git show HEAD^ &&
 	test_must_fail git notes show HEAD^
 '
@@ -119,7 +132,9 @@ test_expect_success 'add w/no options on existing note morphs into edit' '
 	test_path_is_missing .git/NOTES_EDITMSG &&
 	git ls-tree -r refs/notes/commits >actual &&
 	test_line_count = 1 actual &&
-	test "b2" = "$(git notes show)" &&
+	echo b2 >expect &&
+	git notes show >actual &&
+	test_cmp expect actual &&
 	git show HEAD^ &&
 	test_must_fail git notes show HEAD^
 '
@@ -129,7 +144,9 @@ test_expect_success 'can overwrite existing note with "git notes add -f"' '
 	test_path_is_missing .git/NOTES_EDITMSG &&
 	git ls-tree -r refs/notes/commits >actual &&
 	test_line_count = 1 actual &&
-	test "b1" = "$(git notes show)" &&
+	echo b1 >expect &&
+	git notes show >actual &&
+	test_cmp expect actual &&
 	git show HEAD^ &&
 	test_must_fail git notes show HEAD^
 '
@@ -146,7 +163,8 @@ test_expect_success 'show notes' '
 		Notes:
 		${indent}b1
 	EOF
-	! (git cat-file commit HEAD | grep b1) &&
+	git cat-file commit HEAD >commits &&
+	! grep b1 commits &&
 	git log -1 >actual &&
 	test_cmp expect actual
 '
@@ -472,9 +490,11 @@ test_expect_success 'removing with --stdin --ignore-missing' '
 test_expect_success 'list notes with "git notes list"' '
 	commit_2=$(git rev-parse 2nd) &&
 	commit_3=$(git rev-parse 3rd) &&
+	note_2=$(git rev-parse refs/notes/commits:$commit_2) &&
+	note_3=$(git rev-parse refs/notes/commits:$commit_3) &&
 	sort -t" " -k2 >expect <<-EOF &&
-		$(git rev-parse refs/notes/commits:$commit_2) $commit_2
-		$(git rev-parse refs/notes/commits:$commit_3) $commit_3
+		$note_2 $commit_2
+		$note_3 $commit_3
 	EOF
 	git notes list >actual &&
 	test_cmp expect actual
@@ -486,9 +506,7 @@ test_expect_success 'list notes with "git notes"' '
 '
 
 test_expect_success 'list specific note with "git notes list <object>"' '
-	cat >expect <<-EOF &&
-		$(git rev-parse refs/notes/commits:$commit_3)
-	EOF
+	git rev-parse refs/notes/commits:$commit_3 >expect &&
 	git notes list HEAD^^ >actual &&
 	test_cmp expect actual
 '
@@ -512,10 +530,11 @@ test_expect_success 'append to existing note with "git notes append"' '
 
 test_expect_success '"git notes list" does not expand to "git notes list HEAD"' '
 	commit_5=$(git rev-parse 5th) &&
+	note_5=$(git rev-parse refs/notes/commits:$commit_5) &&
 	sort -t" " -k2 >expect_list <<-EOF &&
-		$(git rev-parse refs/notes/commits:$commit_2) $commit_2
-		$(git rev-parse refs/notes/commits:$commit_3) $commit_3
-		$(git rev-parse refs/notes/commits:$commit_5) $commit_5
+		$note_2 $commit_2
+		$note_3 $commit_3
+		$note_5 $commit_5
 	EOF
 	git notes list >actual &&
 	test_cmp expect_list actual
@@ -721,7 +740,8 @@ test_expect_success 'Allow notes on non-commits (trees, blobs, tags)' '
 	git notes show HEAD: >actual &&
 	test_cmp expect actual &&
 	echo "Note on a blob" >expect &&
-	filename=$(git ls-tree --name-only HEAD | head -n1) &&
+	git ls-tree --name-only HEAD >files &&
+	filename=$(head -n1 files) &&
 	git notes add -m "Note on a blob" HEAD:$filename &&
 	git notes show HEAD:$filename >actual &&
 	test_cmp expect actual &&
@@ -745,10 +765,13 @@ test_expect_success 'create note from other note with "git notes add -C"' '
 		Notes:
 		${indent}order test
 	EOF
-	git notes add -C $(git notes list HEAD^) &&
+	note=$(git notes list HEAD^) &&
+	git notes add -C $note &&
 	git log -1 >actual &&
 	test_cmp expect actual &&
-	test "$(git notes list HEAD)" = "$(git notes list HEAD^)"
+	git notes list HEAD^ >expect &&
+	git notes list HEAD >actual &&
+	test_cmp expect actual
 '
 
 test_expect_success 'create note from non-existing note with "git notes add -C" fails' '
@@ -777,11 +800,12 @@ test_expect_success 'create note from blob with "git notes add -C" reuses blob i
 		Notes:
 		${indent}This is a blob object
 	EOF
-	blob=$(echo "This is a blob object" | git hash-object -w --stdin) &&
-	git notes add -C $blob &&
+	echo "This is a blob object" | git hash-object -w --stdin >blob &&
+	git notes add -C $(cat blob) &&
 	git log -1 >actual &&
 	test_cmp expect actual &&
-	test "$(git notes list HEAD)" = "$blob"
+	git notes list HEAD >actual &&
+	test_cmp blob actual
 '
 
 test_expect_success 'create note from other note with "git notes add -c"' '
@@ -797,7 +821,8 @@ test_expect_success 'create note from other note with "git notes add -c"' '
 		Notes:
 		${indent}yet another note
 	EOF
-	MSG="yet another note" git notes add -c $(git notes list HEAD^^) &&
+	note=$(git notes list HEAD^^) &&
+	MSG="yet another note" git notes add -c $note &&
 	git log -1 >actual &&
 	test_cmp expect actual
 '
@@ -822,7 +847,8 @@ test_expect_success 'append to note from other note with "git notes append -C"'
 		${indent}
 		${indent}yet another note
 	EOF
-	git notes append -C $(git notes list HEAD^) HEAD^ &&
+	note=$(git notes list HEAD^) &&
+	git notes append -C $note HEAD^ &&
 	git log -1 HEAD^ >actual &&
 	test_cmp expect actual
 '
@@ -839,7 +865,8 @@ test_expect_success 'create note from other note with "git notes append -c"' '
 		Notes:
 		${indent}other note
 	EOF
-	MSG="other note" git notes append -c $(git notes list HEAD^) &&
+	note=$(git notes list HEAD^) &&
+	MSG="other note" git notes append -c $note &&
 	git log -1 >actual &&
 	test_cmp expect actual
 '
@@ -858,7 +885,8 @@ test_expect_success 'append to note from other note with "git notes append -c"'
 		${indent}
 		${indent}yet another note
 	EOF
-	MSG="yet another note" git notes append -c $(git notes list HEAD) &&
+	note=$(git notes list HEAD) &&
+	MSG="yet another note" git notes append -c $note &&
 	git log -1 >actual &&
 	test_cmp expect actual
 '
@@ -878,7 +906,9 @@ test_expect_success 'copy note with "git notes copy"' '
 	git notes copy 8th 4th &&
 	git log 3rd..4th >actual &&
 	test_cmp expect actual &&
-	test "$(git note list 4th)" = "$(git note list 8th)"
+	git notes list 4th >expect &&
+	git notes list 8th >actual &&
+	test_cmp expect actual
 '
 
 test_expect_success 'copy note with "git notes copy" with default' '
@@ -899,14 +929,30 @@ test_expect_success 'copy note with "git notes copy" with default' '
 	git notes copy HEAD^ &&
 	git log -1 >actual &&
 	test_cmp expect actual &&
-	test "$(git notes list HEAD)" = "$(git notes list HEAD^)"
+	git notes list HEAD^ >expect &&
+	git notes list HEAD >actual &&
+	test_cmp expect actual
 '
 
 test_expect_success 'prevent overwrite with "git notes copy"' '
 	test_must_fail git notes copy HEAD~2 HEAD &&
+	cat >expect <<-EOF &&
+		commit $commit
+		Author: A U Thor <author@example.com>
+		Date:   Thu Apr 7 15:23:13 2005 -0700
+
+		${indent}11th
+
+		Notes:
+		${indent}other note
+		${indent}
+		${indent}yet another note
+	EOF
 	git log -1 >actual &&
 	test_cmp expect actual &&
-	test "$(git notes list HEAD)" = "$(git notes list HEAD^)"
+	git notes list HEAD^ >expect &&
+	git notes list HEAD >actual &&
+	test_cmp expect actual
 '
 
 test_expect_success 'allow overwrite with "git notes copy -f"' '
@@ -924,7 +970,9 @@ test_expect_success 'allow overwrite with "git notes copy -f"' '
 	git notes copy -f HEAD~3 HEAD &&
 	git log -1 >actual &&
 	test_cmp expect actual &&
-	test "$(git notes list HEAD)" = "$(git notes list HEAD~3)"
+	git notes list HEAD~3 >expect &&
+	git notes list HEAD >actual &&
+	test_cmp expect actual
 '
 
 test_expect_success 'allow overwrite with "git notes copy -f" with default' '
@@ -944,7 +992,9 @@ test_expect_success 'allow overwrite with "git notes copy -f" with default' '
 	git notes copy -f HEAD~2 &&
 	git log -1 >actual &&
 	test_cmp expect actual &&
-	test "$(git notes list HEAD)" = "$(git notes list HEAD~2)"
+	git notes list HEAD~2 >expect &&
+	git notes list HEAD >actual &&
+	test_cmp expect actual
 '
 
 test_expect_success 'cannot copy note from object without notes' '
@@ -979,13 +1029,21 @@ test_expect_success 'git notes copy --stdin' '
 		${indent}
 		${indent}yet another note
 	EOF
-	(echo $(git rev-parse HEAD~3) $(git rev-parse HEAD^) &&
-	echo $(git rev-parse HEAD~2) $(git rev-parse HEAD)) |
-	git notes copy --stdin &&
+	from=$(git rev-parse HEAD~3) &&
+	to=$(git rev-parse HEAD^) &&
+	echo "$from" "$to" >copy &&
+	from=$(git rev-parse HEAD~2) &&
+	to=$(git rev-parse HEAD) &&
+	echo "$from" "$to" >>copy &&
+	git notes copy --stdin <copy &&
 	git log -2 >actual &&
 	test_cmp expect actual &&
-	test "$(git notes list HEAD)" = "$(git notes list HEAD~2)" &&
-	test "$(git notes list HEAD^)" = "$(git notes list HEAD~3)"
+	git notes list HEAD~2 >expect &&
+	git notes list HEAD >actual &&
+	test_cmp expect actual &&
+	git notes list HEAD~3 >expect &&
+	git notes list HEAD^ >actual &&
+	test_cmp expect actual
 '
 
 test_expect_success 'git notes copy --for-rewrite (unconfigured)' '
@@ -1006,9 +1064,13 @@ test_expect_success 'git notes copy --for-rewrite (unconfigured)' '
 
 		${indent}14th
 	EOF
-	(echo $(git rev-parse HEAD~3) $(git rev-parse HEAD^) &&
-	echo $(git rev-parse HEAD~2) $(git rev-parse HEAD)) |
-	git notes copy --for-rewrite=foo &&
+	from=$(git rev-parse HEAD~3) &&
+	to=$(git rev-parse HEAD^) &&
+	echo "$from" "$to" >copy &&
+	from=$(git rev-parse HEAD~2) &&
+	to=$(git rev-parse HEAD) &&
+	echo "$from" "$to" >>copy &&
+	git notes copy --for-rewrite=foo <copy &&
 	git log -2 >actual &&
 	test_cmp expect actual
 '
@@ -1041,17 +1103,23 @@ test_expect_success 'git notes copy --for-rewrite (enabled)' '
 	EOF
 	test_config notes.rewriteMode overwrite &&
 	test_config notes.rewriteRef "refs/notes/*" &&
-	(echo $(git rev-parse HEAD~3) $(git rev-parse HEAD^) &&
-	echo $(git rev-parse HEAD~2) $(git rev-parse HEAD)) |
-	git notes copy --for-rewrite=foo &&
+	from=$(git rev-parse HEAD~3) &&
+	to=$(git rev-parse HEAD^) &&
+	echo "$from" "$to" >copy &&
+	from=$(git rev-parse HEAD~2) &&
+	to=$(git rev-parse HEAD) &&
+	echo "$from" "$to" >>copy &&
+	git notes copy --for-rewrite=foo <copy &&
 	git log -2 >actual &&
 	test_cmp expect actual
 '
 
 test_expect_success 'git notes copy --for-rewrite (disabled)' '
 	test_config notes.rewrite.bar false &&
-	echo $(git rev-parse HEAD~3) $(git rev-parse HEAD) |
-	git notes copy --for-rewrite=bar &&
+	from=$(git rev-parse HEAD~3) &&
+	to=$(git rev-parse HEAD) &&
+	echo "$from" "$to" >copy &&
+	git notes copy --for-rewrite=bar <copy &&
 	git log -2 >actual &&
 	test_cmp expect actual
 '
@@ -1071,8 +1139,10 @@ test_expect_success 'git notes copy --for-rewrite (overwrite)' '
 	git notes add -f -m"a fresh note" HEAD^ &&
 	test_config notes.rewriteMode overwrite &&
 	test_config notes.rewriteRef "refs/notes/*" &&
-	echo $(git rev-parse HEAD^) $(git rev-parse HEAD) |
-	git notes copy --for-rewrite=foo &&
+	from=$(git rev-parse HEAD^) &&
+	to=$(git rev-parse HEAD) &&
+	echo "$from" "$to" >copy &&
+	git notes copy --for-rewrite=foo <copy &&
 	git log -1 >actual &&
 	test_cmp expect actual
 '
@@ -1080,8 +1150,10 @@ test_expect_success 'git notes copy --for-rewrite (overwrite)' '
 test_expect_success 'git notes copy --for-rewrite (ignore)' '
 	test_config notes.rewriteMode ignore &&
 	test_config notes.rewriteRef "refs/notes/*" &&
-	echo $(git rev-parse HEAD^) $(git rev-parse HEAD) |
-	git notes copy --for-rewrite=foo &&
+	from=$(git rev-parse HEAD^) &&
+	to=$(git rev-parse HEAD) &&
+	echo "$from" "$to" >copy &&
+	git notes copy --for-rewrite=foo <copy &&
 	git log -1 >actual &&
 	test_cmp expect actual
 '
@@ -1103,8 +1175,10 @@ test_expect_success 'git notes copy --for-rewrite (append)' '
 	git notes add -f -m"another fresh note" HEAD^ &&
 	test_config notes.rewriteMode concatenate &&
 	test_config notes.rewriteRef "refs/notes/*" &&
-	echo $(git rev-parse HEAD^) $(git rev-parse HEAD) |
-	git notes copy --for-rewrite=foo &&
+	from=$(git rev-parse HEAD^) &&
+	to=$(git rev-parse HEAD) &&
+	echo "$from" "$to" >copy &&
+	git notes copy --for-rewrite=foo <copy &&
 	git log -1 >actual &&
 	test_cmp expect actual
 '
@@ -1131,9 +1205,13 @@ test_expect_success 'git notes copy --for-rewrite (append two to one)' '
 	git notes add -f -m"append 2" HEAD^^ &&
 	test_config notes.rewriteMode concatenate &&
 	test_config notes.rewriteRef "refs/notes/*" &&
-	(echo $(git rev-parse HEAD^) $(git rev-parse HEAD) &&
-	echo $(git rev-parse HEAD^^) $(git rev-parse HEAD)) |
-	git notes copy --for-rewrite=foo &&
+	from=$(git rev-parse HEAD^) &&
+	to=$(git rev-parse HEAD) &&
+	echo "$from" "$to" >copy &&
+	from=$(git rev-parse HEAD^^) &&
+	to=$(git rev-parse HEAD) &&
+	echo "$from" "$to" >>copy &&
+	git notes copy --for-rewrite=foo <copy &&
 	git log -1 >actual &&
 	test_cmp expect actual
 '
@@ -1142,8 +1220,10 @@ test_expect_success 'git notes copy --for-rewrite (append empty)' '
 	git notes remove HEAD^ &&
 	test_config notes.rewriteMode concatenate &&
 	test_config notes.rewriteRef "refs/notes/*" &&
-	echo $(git rev-parse HEAD^) $(git rev-parse HEAD) |
-	git notes copy --for-rewrite=foo &&
+	from=$(git rev-parse HEAD^) &&
+	to=$(git rev-parse HEAD) &&
+	echo "$from" "$to" >copy &&
+	git notes copy --for-rewrite=foo <copy &&
 	git log -1 >actual &&
 	test_cmp expect actual
 '
@@ -1163,8 +1243,10 @@ test_expect_success 'GIT_NOTES_REWRITE_MODE works' '
 	test_config notes.rewriteMode concatenate &&
 	test_config notes.rewriteRef "refs/notes/*" &&
 	git notes add -f -m"replacement note 1" HEAD^ &&
-	echo $(git rev-parse HEAD^) $(git rev-parse HEAD) |
-	GIT_NOTES_REWRITE_MODE=overwrite git notes copy --for-rewrite=foo &&
+	from=$(git rev-parse HEAD^) &&
+	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 &&
 	test_cmp expect actual
 '
@@ -1184,9 +1266,11 @@ test_expect_success 'GIT_NOTES_REWRITE_REF works' '
 	git notes add -f -m"replacement note 2" HEAD^ &&
 	test_config notes.rewriteMode overwrite &&
 	test_unconfig notes.rewriteRef &&
-	echo $(git rev-parse HEAD^) $(git rev-parse HEAD) |
+	from=$(git rev-parse HEAD^) &&
+	to=$(git rev-parse HEAD) &&
+	echo "$from" "$to" >copy &&
 	GIT_NOTES_REWRITE_REF=refs/notes/commits:refs/notes/other \
-		git notes copy --for-rewrite=foo &&
+		git notes copy --for-rewrite=foo <copy &&
 	git log -1 >actual &&
 	test_cmp expect actual
 '
@@ -1195,9 +1279,11 @@ test_expect_success 'GIT_NOTES_REWRITE_REF overrides config' '
 	git notes add -f -m"replacement note 3" HEAD^ &&
 	test_config notes.rewriteMode overwrite &&
 	test_config notes.rewriteRef refs/notes/other &&
-	echo $(git rev-parse HEAD^) $(git rev-parse HEAD) |
+	from=$(git rev-parse HEAD^) &&
+	to=$(git rev-parse HEAD) &&
+	echo "$from" "$to" >copy &&
 	GIT_NOTES_REWRITE_REF=refs/notes/commits \
-		git notes copy --for-rewrite=foo &&
+		git notes copy --for-rewrite=foo <copy &&
 	git log -1 >actual &&
 	grep "replacement note 3" actual
 '
@@ -1212,26 +1298,36 @@ test_expect_success 'git notes copy diagnoses too many or too few parameters' '
 test_expect_success 'git notes get-ref expands refs/heads/master to refs/notes/refs/heads/master' '
 	test_unconfig core.notesRef &&
 	sane_unset GIT_NOTES_REF &&
-	test "$(git notes --ref=refs/heads/master get-ref)" = "refs/notes/refs/heads/master"
+	echo refs/notes/refs/heads/master >expect &&
+	git notes --ref=refs/heads/master get-ref >actual &&
+	test_cmp expect actual
 '
 
 test_expect_success 'git notes get-ref (no overrides)' '
 	test_unconfig core.notesRef &&
 	sane_unset GIT_NOTES_REF &&
-	test "$(git notes get-ref)" = "refs/notes/commits"
+	echo refs/notes/commits >expect &&
+	git notes get-ref >actual &&
+	test_cmp expect actual
 '
 
 test_expect_success 'git notes get-ref (core.notesRef)' '
 	test_config core.notesRef refs/notes/foo &&
-	test "$(git notes get-ref)" = "refs/notes/foo"
+	echo refs/notes/foo >expect &&
+	git notes get-ref >actual &&
+	test_cmp expect actual
 '
 
 test_expect_success 'git notes get-ref (GIT_NOTES_REF)' '
-	test "$(GIT_NOTES_REF=refs/notes/bar git notes get-ref)" = "refs/notes/bar"
+	echo refs/notes/bar >expect &&
+	GIT_NOTES_REF=refs/notes/bar git notes get-ref >actual &&
+	test_cmp expect actual
 '
 
 test_expect_success 'git notes get-ref (--ref)' '
-	test "$(GIT_NOTES_REF=refs/notes/bar git notes --ref=baz get-ref)" = "refs/notes/baz"
+	echo refs/notes/baz >expect &&
+	GIT_NOTES_REF=refs/notes/bar git notes --ref=baz get-ref >actual &&
+	test_cmp expect actual
 '
 
 test_expect_success 'setup testing of empty notes' '
-- 
2.24.0.504.g3cd56eb17d
Previous: Denton LiuNext: Denton Liu
Message 159 of 228 in “t: general test cleanup + `set -o pipefail`”
  1. 00/27 t: general test cleanup + `set -o pipefail`Denton Liu, Nov 15, 2019
  2. 01/27 lib-bash.sh: move `then` onto its own lineDenton Liu, Nov 15, 2019
  3. Eric SunshineNov 15, 2019
  4. Junio C HamanoNov 16, 2019
  5. 02/27 t0014: remove git command upstream of pipeDenton Liu, Nov 15, 2019
  6. 03/27 t0090: stop losing return codes of git commandsDenton Liu, Nov 15, 2019
  7. 04/27 t3301: stop losing return codes of git commandsDenton Liu, Nov 15, 2019
  8. 06/27 t3600: stop losing return codes of git commandsDenton Liu, Nov 15, 2019
  9. 05/27 t3600: use test_line_count() where possibleDenton Liu, Nov 15, 2019
  10. 07/27 t3600: comment on inducing SIGPIPE in `git rm`Denton Liu, Nov 15, 2019
  11. 09/27 t4015: use test_write_lines()Denton Liu, Nov 15, 2019
  12. 08/27 t4015: stop losing return codes of git commandsDenton Liu, Nov 15, 2019
  13. 10/27 t4138: stop losing return codes of git commandsDenton Liu, Nov 15, 2019
  14. Eric SunshineNov 16, 2019
  15. 11/27 t5317: stop losing return codes of git commandsDenton Liu, Nov 15, 2019
  16. 12/27 t5317: use ! grep to check for no matching linesDenton Liu, Nov 15, 2019
  17. Eric SunshineNov 16, 2019
  18. 13/27 t5703: stop losing return codes of git commandsDenton Liu, Nov 15, 2019
  19. Eric SunshineNov 16, 2019
  20. 14/27 t7501: remove spaces after redirect operatorsDenton Liu, Nov 15, 2019
  21. 15/27 t7501: stop losing return codes of git commandsDenton Liu, Nov 15, 2019
  22. Eric SunshineNov 16, 2019
  23. 16/27 t7700: drop redirections to /dev/nullDenton Liu, Nov 15, 2019
  24. 17/27 t7700: remove spaces after redirect operatorsDenton Liu, Nov 15, 2019
  25. 19/27 t7700: s/test -f/test_path_is_file/Denton Liu, Nov 15, 2019
  26. 18/27 t7700: move keywords onto their own lineDenton Liu, Nov 15, 2019
  27. 20/27 t7700: stop losing return codes of git commandsDenton Liu, Nov 15, 2019
  28. 21/27 t: define test_grep_return_success()Denton Liu, Nov 15, 2019
  29. Junio C HamanoNov 15, 2019
  30. 22/27 t0090: mask failing grep statusDenton Liu, Nov 15, 2019
  31. 23/27 t3600: mark git command as failingDenton Liu, Nov 15, 2019
  32. Junio C HamanoNov 15, 2019
  33. 24/27 t5004: ignore SIGPIPE in zipinfoDenton Liu, Nov 15, 2019
  34. Junio C HamanoNov 15, 2019
  35. 25/27 t5703: mask failing grep statusDenton Liu, Nov 15, 2019
  36. 26/27 t9902: disable pipefailDenton Liu, Nov 15, 2019
  37. 27/27 t: run tests with `set -o pipefail` on BashDenton Liu, Nov 15, 2019
  38. Jeff KingNov 15, 2019
  39. 0/6 tests: add a bash "set -o pipefail" test modeÆvar Arnfjörð Bjarmason, Jan 14, 2021
  40. 09/11 archive tests: use a cheaper "zipinfo -h" invocation to get headerÆvar Arnfjörð Bjarmason, Jan 16, 2021
  41. Jeff KingJan 17, 2021
  42. 08/11 upload-pack tests: avoid a non-zero "grep" exit statusÆvar Arnfjörð Bjarmason, Jan 16, 2021
  43. Junio C HamanoJan 16, 2021
  44. 10/11 tests: split up bash detection libraryÆvar Arnfjörð Bjarmason, Jan 16, 2021
  45. 05/11 git svn mergeinfo tests: refactor "test -z" to use test_must_be_emptyÆvar Arnfjörð Bjarmason, Jan 16, 2021
  46. 11/11 tests: add a "set -o pipefail" for a patched bashÆvar Arnfjörð Bjarmason, Jan 16, 2021
  47. SZEDER GáborJan 20, 2021
  48. Junio C HamanoJan 23, 2021
  49. Junio C HamanoJan 23, 2021
  50. Ævar Arnfjörð BjarmasonJan 23, 2021
  51. 01/10 cache-tree tests: refactor for modern test styleÆvar Arnfjörð Bjarmason, Jan 23, 2021
  52. Junio C HamanoJan 23, 2021
  53. 00/10 Miscellaneous "set -o pipefail"-related test cleanupsÆvar Arnfjörð Bjarmason, Jan 23, 2021
  54. 02/10 cache-tree tests: remove unused $2 parameterÆvar Arnfjörð Bjarmason, Jan 23, 2021
  55. Junio C HamanoJan 23, 2021
  56. 03/10 cache-tree tests: use a sub-shell with less indirectionÆvar Arnfjörð Bjarmason, Jan 23, 2021
  57. Junio C HamanoJan 23, 2021
  58. 04/10 cache-tree tests: explicitly test HEAD and index differencesÆvar Arnfjörð Bjarmason, Jan 23, 2021
  59. 05/10 git svn mergeinfo tests: modernize redirection & quoting styleÆvar Arnfjörð Bjarmason, Jan 23, 2021
  60. 06/10 git svn mergeinfo tests: refactor "test -z" to use test_must_be_emptyÆvar Arnfjörð Bjarmason, Jan 23, 2021
  61. 07/10 git-svn tests: rewrite brittle tests to use "--[no-]merges".Ævar Arnfjörð Bjarmason, Jan 23, 2021
  62. 08/10 upload-pack tests: avoid a non-zero "grep" exit statusÆvar Arnfjörð Bjarmason, Jan 23, 2021
  63. 10/10 rm tests: actually test for SIGPIPE in SIGPIPE testÆvar Arnfjörð Bjarmason, Jan 23, 2021
  64. 09/10 archive tests: use a cheaper "zipinfo -h" invocation to get headerÆvar Arnfjörð Bjarmason, Jan 23, 2021
  65. Ævar Arnfjörð BjarmasonJan 23, 2021
  66. 02/11 cache-tree tests: use a sub-shell with less indirectionÆvar Arnfjörð Bjarmason, Jan 16, 2021
  67. Jeff KingJan 17, 2021
  68. Eric SunshineJan 17, 2021
  69. Junio C HamanoJan 17, 2021
  70. 07/11 rm tests: actually test for SIGPIPE in SIGPIPE testÆvar Arnfjörð Bjarmason, Jan 16, 2021
  71. 03/11 cache-tree tests: refactor overly complex functionÆvar Arnfjörð Bjarmason, Jan 16, 2021
  72. Junio C HamanoJan 16, 2021
  73. 01/11 cache-tree tests: remove unused $2 parameterÆvar Arnfjörð Bjarmason, Jan 16, 2021
  74. 06/11 git-svn tests: rewrite brittle tests to use "--[no-]merges".Ævar Arnfjörð Bjarmason, Jan 16, 2021
  75. Junio C HamanoJan 16, 2021
  76. Jeff KingJan 17, 2021
  77. 04/11 git svn mergeinfo tests: modernize redirection & quoting styleÆvar Arnfjörð Bjarmason, Jan 16, 2021
  78. Junio C HamanoJan 16, 2021
  79. 00/11 tests: add a bash "set -o pipefail" test modeÆvar Arnfjörð Bjarmason, Jan 16, 2021
  80. Junio C HamanoJan 16, 2021
  81. Jeff KingJan 17, 2021
  82. 2/6 test-lib: add ok=* support to test_might_failÆvar Arnfjörð Bjarmason, Jan 14, 2021
  83. 1/6 test-lib: add tests for test_might_failÆvar Arnfjörð Bjarmason, Jan 14, 2021
  84. Jeff KingJan 15, 2021
  85. test-lib: add tests for test_might_failÆvar Arnfjörð Bjarmason, Jan 16, 2021
  86. Jeff KingJan 17, 2021
  87. 4/6 tests: use "test_might_fail ok=sigpipe grep" when appropriateÆvar Arnfjörð Bjarmason, Jan 14, 2021
  88. Ævar Arnfjörð BjarmasonJan 15, 2021
  89. Jeff KingJan 15, 2021
  90. 3/6 test_lib: allow test_{must,might}_fail to accept non-git on "sigpipe"Ævar Arnfjörð Bjarmason, Jan 14, 2021
  91. Denton LiuJan 15, 2021
  92. Ævar Arnfjörð BjarmasonJan 15, 2021
  93. Jeff KingJan 15, 2021
  94. 5/6 tests: split up bash detection libraryÆvar Arnfjörð Bjarmason, Jan 14, 2021
  95. Ævar Arnfjörð BjarmasonJan 15, 2021
  96. 6/6 tests: add a "set -o pipefail" for a patched bashÆvar Arnfjörð Bjarmason, Jan 14, 2021
  97. Jeff KingJan 15, 2021
  98. 00/21 t: test cleanup stemming from experimentally enabling pipefailDenton Liu, Nov 21, 2019
  99. 01/21 lib-bash.sh: move `then` onto its own lineDenton Liu, Nov 21, 2019
  100. 02/21 t0014: remove git command upstream of pipeDenton Liu, Nov 21, 2019
  101. 03/21 t0090: stop losing return codes of git commandsDenton Liu, Nov 21, 2019
  102. 04/21 t3301: stop losing return codes of git commandsDenton Liu, Nov 21, 2019
  103. 05/21 t3600: use test_line_count() where possibleDenton Liu, Nov 21, 2019
  104. 06/21 t3600: stop losing return codes of git commandsDenton Liu, Nov 21, 2019
  105. 07/21 t3600: comment on inducing SIGPIPE in `git rm`Denton Liu, Nov 21, 2019
  106. 08/21 t4015: stop losing return codes of git commandsDenton Liu, Nov 21, 2019
  107. 09/21 t4015: use test_write_lines()Denton Liu, Nov 21, 2019
  108. 10/21 t4138: stop losing return codes of git commandsDenton Liu, Nov 21, 2019
  109. 11/21 t5317: stop losing return codes of git commandsDenton Liu, Nov 21, 2019
  110. 12/21 t5317: use ! grep to check for no matching linesDenton Liu, Nov 21, 2019
  111. Eric SunshineNov 21, 2019
  112. 13/21 t5703: simplify one-time-sed generation logicDenton Liu, Nov 21, 2019
  113. Eric SunshineNov 21, 2019
  114. Denton LiuNov 21, 2019
  115. 14/21 t5703: stop losing return codes of git commandsDenton Liu, Nov 21, 2019
  116. 15/21 t7501: remove spaces after redirect operatorsDenton Liu, Nov 21, 2019
  117. 16/21 t7501: stop losing return codes of git commandsDenton Liu, Nov 21, 2019
  118. 17/21 t7700: drop redirections to /dev/nullDenton Liu, Nov 21, 2019
  119. 18/21 t7700: remove spaces after redirect operatorsDenton Liu, Nov 21, 2019
  120. 19/21 t7700: move keywords onto their own lineDenton Liu, Nov 21, 2019
  121. 20/21 t7700: s/test -f/test_path_is_file/Denton Liu, Nov 21, 2019
  122. 21/21 t7700: stop losing return codes of git commandsDenton Liu, Nov 21, 2019
  123. 00/22 t: test cleanup stemming from experimentally enabling pipefailDenton Liu, Nov 22, 2019
  124. 01/22 lib-bash.sh: move `then` onto its own lineDenton Liu, Nov 22, 2019
  125. 02/22 apply-one-time-sed.sh: modernize styleDenton Liu, Nov 22, 2019
  126. Junio C HamanoNov 23, 2019
  127. 03/22 t0014: remove git command upstream of pipeDenton Liu, Nov 22, 2019
  128. 04/22 t0090: stop losing return codes of git commandsDenton Liu, Nov 22, 2019
  129. 05/22 t3301: stop losing return codes of git commandsDenton Liu, Nov 22, 2019
  130. 06/22 t3600: use test_line_count() where possibleDenton Liu, Nov 22, 2019
  131. 07/22 t3600: stop losing return codes of git commandsDenton Liu, Nov 22, 2019
  132. 08/22 t3600: comment on inducing SIGPIPE in `git rm`Denton Liu, Nov 22, 2019
  133. 09/22 t4015: stop losing return codes of git commandsDenton Liu, Nov 22, 2019
  134. 10/22 t4015: use test_write_lines()Denton Liu, Nov 22, 2019
  135. 11/22 t4138: stop losing return codes of git commandsDenton Liu, Nov 22, 2019
  136. 12/22 t5317: stop losing return codes of git commandsDenton Liu, Nov 22, 2019
  137. 13/22 t5317: use ! grep to check for no matching linesDenton Liu, Nov 22, 2019
  138. Eric SunshineNov 23, 2019
  139. Denton LiuNov 25, 2019
  140. 14/22 t5703: simplify one-time-sed generation logicDenton Liu, Nov 22, 2019
  141. 15/22 t5703: stop losing return codes of git commandsDenton Liu, Nov 22, 2019
  142. 16/22 t7501: remove spaces after redirect operatorsDenton Liu, Nov 22, 2019
  143. 17/22 t7501: stop losing return codes of git commandsDenton Liu, Nov 22, 2019
  144. 18/22 t7700: drop redirections to /dev/nullDenton Liu, Nov 22, 2019
  145. 19/22 t7700: remove spaces after redirect operatorsDenton Liu, Nov 22, 2019
  146. 20/22 t7700: move keywords onto their own lineDenton Liu, Nov 22, 2019
  147. 21/22 t7700: s/test -f/test_path_is_file/Denton Liu, Nov 22, 2019
  148. 22/22 t7700: stop losing return codes of git commandsDenton Liu, Nov 22, 2019
  149. Junio C HamanoNov 23, 2019
  150. Denton LiuNov 25, 2019
  151. Eric SunshineNov 26, 2019
  152. Junio C HamanoNov 26, 2019
  153. Denton LiuNov 26, 2019
  154. 00/27 t: test cleanup stemming from experimentally enabling pipefailDenton Liu, Nov 26, 2019
  155. 01/27 lib-bash.sh: move `then` onto its own lineDenton Liu, Nov 26, 2019
  156. 02/27 apply-one-time-sed.sh: modernize styleDenton Liu, Nov 26, 2019
  157. 03/27 t0014: remove git command upstream of pipeDenton Liu, Nov 26, 2019
  158. 04/27 t0090: stop losing return codes of git commandsDenton Liu, Nov 26, 2019
  159. 05/27 t3301: stop losing return codes of git commandsDenton Liu, Nov 26, 2019
  160. 06/27 t3600: use test_line_count() where possibleDenton Liu, Nov 26, 2019
  161. 07/27 t3600: stop losing return codes of git commandsDenton Liu, Nov 26, 2019
  162. 08/27 t3600: comment on inducing SIGPIPE in `git rm`Denton Liu, Nov 26, 2019
  163. 09/27 t4015: stop losing return codes of git commandsDenton Liu, Nov 26, 2019
  164. 10/27 t4015: use test_write_lines()Denton Liu, Nov 26, 2019
  165. 11/27 t4138: stop losing return codes of git commandsDenton Liu, Nov 26, 2019
  166. 12/27 t5317: stop losing return codes of git commandsDenton Liu, Nov 26, 2019
  167. 13/27 t5317: use ! grep to check for no matching linesDenton Liu, Nov 26, 2019
  168. 14/27 t5703: simplify one-time-sed generation logicDenton Liu, Nov 26, 2019
  169. 15/27 t5703: stop losing return codes of git commandsDenton Liu, Nov 26, 2019
  170. 16/27 t7501: remove spaces after redirect operatorsDenton Liu, Nov 26, 2019
  171. 17/27 t7501: stop losing return codes of git commandsDenton Liu, Nov 26, 2019
  172. 18/27 t7700: drop redirections to /dev/nullDenton Liu, Nov 26, 2019
  173. 19/27 t7700: remove spaces after redirect operatorsDenton Liu, Nov 26, 2019
  174. 20/27 t7700: move keywords onto their own lineDenton Liu, Nov 26, 2019
  175. 21/27 t7700: s/test -f/test_path_is_file/Denton Liu, Nov 26, 2019
  176. 22/27 t7700: consolidate code into test_no_missing_in_packs()Denton Liu, Nov 26, 2019
  177. Eric SunshineNov 26, 2019
  178. 23/27 squash! t7700: consolidate code into test_no_missing_in_packs()Denton Liu, Nov 26, 2019
  179. 24/27 t7700: consolidate code into test_has_duplicate_object()Denton Liu, Nov 26, 2019
  180. 25/27 t7700: replace egrep with grepDenton Liu, Nov 26, 2019
  181. 26/27 t7700: make references to SHA-1 genericDenton Liu, Nov 26, 2019
  182. Eric SunshineNov 26, 2019
  183. 27/27 t7700: stop losing return codes of git commandsDenton Liu, Nov 26, 2019
  184. 00/26 t: test cleanup stemming from experimentally enabling pipefailDenton Liu, Nov 27, 2019
  185. 01/26 lib-bash.sh: move `then` onto its own lineDenton Liu, Nov 27, 2019
  186. 02/26 apply-one-time-sed.sh: modernize styleDenton Liu, Nov 27, 2019
  187. 03/26 t0014: remove git command upstream of pipeDenton Liu, Nov 27, 2019
  188. 04/26 t0090: stop losing return codes of git commandsDenton Liu, Nov 27, 2019
  189. 05/26 t3301: stop losing return codes of git commandsDenton Liu, Nov 27, 2019
  190. 06/26 t3600: use test_line_count() where possibleDenton Liu, Nov 27, 2019
  191. 07/26 t3600: stop losing return codes of git commandsDenton Liu, Nov 27, 2019
  192. 08/26 t3600: comment on inducing SIGPIPE in `git rm`Denton Liu, Nov 27, 2019
  193. 09/26 t4015: stop losing return codes of git commandsDenton Liu, Nov 27, 2019
  194. 11/26 t4138: stop losing return codes of git commandsDenton Liu, Nov 27, 2019
  195. 10/26 t4015: use test_write_lines()Denton Liu, Nov 27, 2019
  196. 12/26 t5317: stop losing return codes of git commandsDenton Liu, Nov 27, 2019
  197. 13/26 t5317: use ! grep to check for no matching linesDenton Liu, Nov 27, 2019
  198. 14/26 t5703: simplify one-time-sed generation logicDenton Liu, Nov 27, 2019
  199. 15/26 t5703: stop losing return codes of git commandsDenton Liu, Nov 27, 2019
  200. 16/26 t7501: remove spaces after redirect operatorsDenton Liu, Nov 27, 2019
  201. 17/26 t7501: stop losing return codes of git commandsDenton Liu, Nov 27, 2019
  202. 18/26 t7700: drop redirections to /dev/nullDenton Liu, Nov 27, 2019
  203. 19/26 t7700: remove spaces after redirect operatorsDenton Liu, Nov 27, 2019
  204. 20/26 t7700: move keywords onto their own lineDenton Liu, Nov 27, 2019
  205. 21/26 t7700: s/test -f/test_path_is_file/Denton Liu, Nov 27, 2019
  206. 22/26 t7700: consolidate code into test_no_missing_in_packs()Denton Liu, Nov 27, 2019
  207. Junio C HamanoNov 29, 2019
  208. Denton LiuDec 2, 2019
  209. Junio C HamanoDec 2, 2019
  210. Denton LiuDec 2, 2019
  211. Junio C HamanoDec 3, 2019
  212. Denton LiuDec 4, 2019
  213. Junio C HamanoDec 4, 2019
  214. 0/5 t: test cleanup stemming from experimentally enabling pipefailDenton Liu, Dec 4, 2019
  215. 1/5 t7700: consolidate code into test_no_missing_in_packs()Denton Liu, Dec 4, 2019
  216. 2/5 t7700: consolidate code into test_has_duplicate_object()Denton Liu, Dec 4, 2019
  217. 3/5 t7700: replace egrep with grepDenton Liu, Dec 4, 2019
  218. 4/5 t7700: make references to SHA-1 genericDenton Liu, Dec 4, 2019
  219. 5/5 t7700: stop losing return codes of git commandsDenton Liu, Dec 4, 2019
  220. Junio C HamanoDec 4, 2019
  221. 23/26 t7700: consolidate code into test_has_duplicate_object()Denton Liu, Nov 27, 2019
  222. 24/26 t7700: replace egrep with grepDenton Liu, Nov 27, 2019
  223. 25/26 t7700: make references to SHA-1 genericDenton Liu, Nov 27, 2019
  224. 26/26 t7700: stop losing return codes of git commandsDenton Liu, Nov 27, 2019
  225. Danh DoanNov 30, 2019
  226. Eric SunshineNov 30, 2019
  227. Junio C HamanoNov 30, 2019
  228. t: remove inappropriate uses of test_must_fail(), was Re: [PATCH v5 26/26] t7700: stop losing return codes of git commandsDenton Liu, Dec 4, 2019

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.