@@ -136,25 +136,6 @@ void test_checkout_index__honor_coreautocrlf_setting_set_to_true(void)
136136#endif
137137}
138138
139- static bool supports_symlinks (const char * dir )
140- {
141- git_buf path = GIT_BUF_INIT ;
142- struct stat st ;
143- bool supports_symlinks = 1 ;
144-
145- cl_git_pass (git_buf_joinpath (& path , dir , "test" ));
146-
147- /* see if symlinks are supported in the "symlink" directory */
148- if (p_symlink ("target" , path .ptr ) < 0 ||
149- p_lstat (path .ptr , & st ) < 0 ||
150- ! (S_ISLNK (st .st_mode )))
151- supports_symlinks = 0 ;
152-
153- git_buf_dispose (& path );
154-
155- return supports_symlinks ;
156- }
157-
158139void test_checkout_index__honor_coresymlinks_default (void )
159140{
160141 git_repository * repo ;
@@ -181,7 +162,7 @@ void test_checkout_index__honor_coresymlinks_default(void)
181162 git_object_free (target );
182163 git_repository_free (repo );
183164
184- if (!supports_symlinks ("symlink" )) {
165+ if (!filesystem_supports_symlinks ("symlink/test " )) {
185166 check_file_contents ("./symlink/link_to_new.txt" , "new.txt" );
186167 } else {
187168 char link_data [1024 ];
@@ -203,7 +184,7 @@ void test_checkout_index__coresymlinks_set_to_true_fails_when_unsupported(void)
203184{
204185 git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT ;
205186
206- if (supports_symlinks ("testrepo" )) {
187+ if (filesystem_supports_symlinks ("testrepo/test " )) {
207188 cl_skip ();
208189 }
209190
@@ -219,7 +200,7 @@ void test_checkout_index__honor_coresymlinks_setting_set_to_true(void)
219200 char link_data [GIT_PATH_MAX ];
220201 size_t link_size = GIT_PATH_MAX ;
221202
222- if (!supports_symlinks ("testrepo" )) {
203+ if (!filesystem_supports_symlinks ("testrepo/test " )) {
223204 cl_skip ();
224205 }
225206
0 commit comments