@@ -23,14 +23,6 @@ cache_symlink () {
23
23
git update-index --add --cacheinfo 120000,$sha ," $2 "
24
24
}
25
25
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
-
34
26
test_expect_success ' checkout symlinks with attr' '
35
27
cache_symlink file1 file-link &&
36
28
cache_symlink dir dir-link &&
@@ -41,11 +33,14 @@ test_expect_success 'checkout symlinks with attr' '
41
33
git checkout . &&
42
34
43
35
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"
49
44
'
50
45
51
46
test_done
0 commit comments