Skip to content

Commit e19b319

Browse files
avargitster
authored andcommitted
apply tests: don't ignore "git ls-files" exit code, drop sub-shell
Fix code added in 969c877 (git apply --directory broken for new files, 2008-10-12) so that it doesn't invoke "git ls-files" on the left-hand-side of a pipe, instead let's use an intermediate file. Since we're doing that we can also drop the sub-shell that was here to group the two. There are a lot of these sorts of patterns in the test suite, and there's no particular reason to fix this one other than in a preceding commit all similar patterns except this one were fixed in "t/t4128-apply-root.sh", so let's fix this one straggler as well. Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 72aae6d commit e19b319

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

t/t4128-apply-root.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ test_expect_success 'apply --directory (delete file)' '
9696
echo content >some/sub/dir/delfile &&
9797
git add some/sub/dir/delfile &&
9898
git apply --directory=some/sub/dir/ --index patch &&
99-
! (git ls-files | grep delfile)
99+
git ls-files >out &&
100+
! grep delfile out
100101
'
101102

102103
cat > patch << 'EOF'

0 commit comments

Comments
 (0)