t1301-*.sh: Fix the 'forced modes' test on cygwin
[gitweb.git] / compat / cygwin.c
index b4a51b958c5651d3b509013aaef0c4e30b68a816..b38dbd7f8fb557b3cf70aef29ec173afc106d5fc 100644 (file)
@@ -114,8 +114,7 @@ static int git_cygwin_config(const char *var, const char *value, void *cb)
 
 static int init_stat(void)
 {
-       if (have_git_dir()) {
-               git_config(git_cygwin_config, NULL);
+       if (have_git_dir() && git_config(git_cygwin_config,NULL)) {
                if (!core_filemode && native_stat) {
                        cygwin_stat_fn = cygwin_stat;
                        cygwin_lstat_fn = cygwin_lstat;