Skip to content

Commit 774282d

Browse files
committed
Merge branch 'sb/checkout-test-complex-path'
* sb/checkout-test-complex-path: checkout test: enable test with complex relative path
2 parents 0e3b378 + b0afc02 commit 774282d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

t/t2008-checkout-subdir.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ test_expect_success 'checkout with simple prefix' '
5858
5959
'
6060

61-
# This is not expected to work as ls-files was not designed
62-
# to deal with such. Enable it when ls-files is updated.
63-
: test_expect_success 'checkout with complex relative path' '
64-
65-
rm file1 &&
66-
git checkout HEAD -- ../dir1/../dir1/file1 && test -f ./file1
67-
61+
test_expect_success 'checkout with complex relative path' '
62+
(
63+
cd dir1 &&
64+
rm file1 &&
65+
git checkout HEAD -- ../dir1/../dir1/file1 &&
66+
test "hello" = "$(cat file1)"
67+
)
6868
'
6969

7070
test_expect_success 'relative path outside tree should fail' \

0 commit comments

Comments
 (0)