refactor run_receive_hook()
[gitweb.git] / compat / cygwin.c
index ba3327f1f96922c91a4e3f0094c0fa10cde0301e..dfe9b3084ffbfd6c41a648e32a1857e78b566215 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;