Skip to content

Commit 085479e

Browse files
committed
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 <[email protected]>
1 parent daab4ee commit 085479e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compat/cygwin.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ static int cygwin_stat(const char *path, struct stat *buf)
101101
* and calling git_default_config() from here would break such variables.
102102
*/
103103
static int native_stat = 1;
104-
static int core_filemode;
104+
static int core_filemode = 1; /* matches trust_executable_bit default */
105105

106106
static int git_cygwin_config(const char *var, const char *value, void *cb)
107107
{

0 commit comments

Comments
 (0)