tests: drop use of 'tee' that hides exit status
A few tests have "| tee output" downstream of a git command, and then inspect the contents of the file. The net effect is that we use an extra process, and hide the exit status from the upstream git command. In any of these tests, I do not see a reason why we want to hide a possible failure from these git commands. Replace the use of tee with a plain simple redirection. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
Aug 8, 2024 at 14:19 UTC
0d66f601a9f82a6f3b4240cffa2b02ed5393f1ee
2 files changed
+3
-3
t/t1001-read-tree-m-2way.sh
+1
-1
@@ -397,7 +397,7 @@ test_expect_success 'a/b vs a, plus c/d case setup.' '
397
398
test_expect_success 'a/b vs a, plus c/d case test.' '
399
read_tree_u_must_succeed -u -m "$treeH" "$treeM" &&
400
- git ls-files --stage | tee >treeMcheck.out &&
400
+ git ls-files --stage >treeMcheck.out &&
401
test_cmp treeM.out treeMcheck.out
402
'
403
t/t5523-push-upstream.sh
+2
-2
@@ -116,14 +116,14 @@ test_expect_success TTY 'push --no-progress suppresses progress' '
116
test_expect_success TTY 'quiet push' '
117
ensure_fresh_upstream &&
118
119
- test_terminal git push --quiet --no-progress upstream main 2>&1 | tee output &&
119
+ test_terminal git push --quiet --no-progress upstream main >output 2>&1 &&
120
test_must_be_empty output
121
'
122
123
test_expect_success TTY 'quiet push -u' '
124
ensure_fresh_upstream &&
125
126
- test_terminal git push --quiet -u --no-progress upstream main 2>&1 | tee output &&
126
+ test_terminal git push --quiet -u --no-progress upstream main >output 2>&1 &&
127
test_must_be_empty output
128
'
129