Skip to content

Commit 99d1fe0

Browse files
authored
Merge pull request #2415 from dscho/fix-t2040
Fix t2040
2 parents a4c71cf + 3d15d04 commit 99d1fe0

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

t/t2040-checkout-symlink-attr.sh

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,6 @@ cache_symlink () {
2323
git update-index --add --cacheinfo 120000,$sha,"$2"
2424
}
2525

26-
# MSYS2 is very forgiving, it will resolve symlinks even if the
27-
# symlink type isn't correct. To make this test meaningful, try
28-
# them with a native, non-MSYS executable.
29-
cat_native () {
30-
filename=$(cygpath -w "$1") &&
31-
cmd.exe /c "type \"$filename\""
32-
}
33-
3426
test_expect_success 'checkout symlinks with attr' '
3527
cache_symlink file1 file-link &&
3628
cache_symlink dir dir-link &&
@@ -41,11 +33,14 @@ test_expect_success 'checkout symlinks with attr' '
4133
git checkout . &&
4234
4335
mkdir dir &&
44-
echo "contents1" >file1 &&
45-
echo "contents2" >dir/file2 &&
46-
47-
test "$(cat_native file-link)" = "contents1" &&
48-
test "$(cat_native dir-link/file2)" = "contents2"
36+
echo "[a]b=c" >file1 &&
37+
echo "[x]y=z" >dir/file2 &&
38+
39+
# MSYS2 is very forgiving, it will resolve symlinks even if the
40+
# symlink type is incorrect. To make this test meaningful, try
41+
# them with a native, non-MSYS executable, such as `git config`.
42+
test "$(git config -f file-link a.b)" = "c" &&
43+
test "$(git config -f dir-link/file2 x.y)" = "z"
4944
'
5045

5146
test_done

0 commit comments

Comments
 (0)