diff options
author | Amanda Shafack <shafack.likhene@gmail.com> | 2020-10-18 23:48:07 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-10-18 23:54:11 +0300 |
commit | a90765bef5556512160b4c302eb7f9dde159130f (patch) | |
tree | 89ce8ed5ff9f22ddb255d0c0374ee6f201cb6135 /t/t2200-add-update.sh | |
parent | 2a809eccbc6099183176b3c4760f857d09a50599 (diff) |
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>
Diffstat (limited to 't/t2200-add-update.sh')
-rwxr-xr-x | t/t2200-add-update.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/t/t2200-add-update.sh b/t/t2200-add-update.sh index f764b7e3f5..7cb7a70382 100755 --- a/t/t2200-add-update.sh +++ b/t/t2200-add-update.sh @@ -179,7 +179,8 @@ test_expect_success 'add -u resolves unmerged paths' ' test_expect_success '"add -u non-existent" should fail' ' test_must_fail git add -u non-existent && - ! (git ls-files | grep "non-existent") + git ls-files >actual && + ! grep "non-existent" actual ' test_done |