t2200,t9832: avoid using 'git' upstream in a pipe
Avoid placing `git` upstream in a pipe since doing so throws away its exit code, thus an unexpected failure may go unnoticed. Signed-off-by: Amanda Shafack <shafack.likhene@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Amanda Shafack committed
Oct 18, 2020 at 20:48 UTC
a90765bef5556512160b4c302eb7f9dde159130f
2 files changed
+4
-2
t/t2200-add-update.sh
+2
-1
@@ -179,7 +179,8 @@ test_expect_success 'add -u resolves unmerged paths' '
179
180
test_expect_success '"add -u non-existent" should fail' '
181
test_must_fail git add -u non-existent &&
182
- ! (git ls-files | grep "non-existent")
182
+ git ls-files >actual &&
183
+ ! grep "non-existent" actual
184
'
185
186
test_done
t/t9832-unshelve.sh
+2
-1
@@ -68,7 +68,8 @@ EOF
68
cd "$git" &&
69
change=$(last_shelved_change) &&
70
git p4 unshelve $change &&
71
- git show refs/remotes/p4-unshelved/$change | grep -q "Further description" &&
71
+ git show refs/remotes/p4-unshelved/$change >actual &&
72
+ grep -q "Further description" actual &&
73
git cherry-pick refs/remotes/p4-unshelved/$change &&
74
test_path_is_file file2 &&
75
test_cmp file1 "$cli"/file1 &&