From: Junio C Hamano Date: Mon, 20 Jun 2011 19:31:59 +0000 (-0700) Subject: cygwin: trust executable bit by default X-Git-Tag: v1.7.6.1~43^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=085479e7001b6feb7e9be02e77d84e27be796774;p=git.git cygwin: trust executable bit by default Earlier 7974843 (compat/cygwin.c: make runtime detection of lstat/stat lessor impact, 2008-10-23) fixed the low-level "do we use cygwin specific hacks for stat/lstat?" logic not to call into git_default_config() from random codepaths that are typically very late in the program, to prevent the call from potentially overwriting other variables that are initialized from the configuration. However, it forgot that on Cygwin, trust-executable-bit should default to true. Noticed by J6t, confirmed by Ramsay Jones, and the brown paper bag is on Gitster's head. Signed-off-by: Junio C Hamano --- diff --git a/compat/cygwin.c b/compat/cygwin.c index b4a51b958..ba3327f1f 100644 --- a/compat/cygwin.c +++ b/compat/cygwin.c @@ -101,7 +101,7 @@ static int cygwin_stat(const char *path, struct stat *buf) * and calling git_default_config() from here would break such variables. */ static int native_stat = 1; -static int core_filemode; +static int core_filemode = 1; /* matches trust_executable_bit default */ static int git_cygwin_config(const char *var, const char *value, void *cb) {