1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-29 23:46:08 +02:00

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>
This commit is contained in:
Amanda Shafack 2020-10-18 20:48:07 +00:00 committed by Junio C Hamano
parent 2a809eccbc
commit a90765bef5
2 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -68,7 +68,8 @@ EOF
cd "$git" &&
change=$(last_shelved_change) &&
git p4 unshelve $change &&
git show refs/remotes/p4-unshelved/$change | grep -q "Further description" &&
git show refs/remotes/p4-unshelved/$change >actual &&
grep -q "Further description" actual &&
git cherry-pick refs/remotes/p4-unshelved/$change &&
test_path_is_file file2 &&
test_cmp file1 "$cli"/file1 &&