Merge branch 'pb/send-email-te'
[gitweb.git] / builtin / init-db.c
index aab44d2e451b1b6a2c764a5d62464ae690ab5566..2619ca5881694b68e24ce13c41347829e4e7d7bb 100644 (file)
@@ -256,6 +256,8 @@ static int create_default_files(const char *template_path)
                                !lstat(path, &st2) &&
                                st1.st_mode != st2.st_mode &&
                                !chmod(path, st1.st_mode));
+               if (filemode && !reinit && (st1.st_mode & S_IXUSR))
+                       filemode = 0;
        }
        git_config_set("core.filemode", filemode ? "true" : "false");