Re: [PATCH] Add a new lstat implementation based on Win32 API, and make stat use that implementation too.
From: Reece Dunn <hidden>
Date: 2016-06-15 22:43:32
On 02/09/07, Marius Storm-Olsen [off-list ref] wrote:
This gives us a significant speedup when adding, committing and stat'ing files. (Also, since Windows doesn't really handle symlinks, it's fine that stat just uses lstat) + if (ext && (!_stricmp(ext, ".exe") || + !_stricmp(ext, ".com") || + !_stricmp(ext, ".bat") || + !_stricmp(ext, ".cmd"))) + fMode |= S_IEXEC; + }
This breaks executable mode reporting for things like configure scripts and other shell scripts that may, or may not, be executable. Also, you may want to turn off the executable state for some of these extensions (for example if com or cmd were not actually executable files). This makes it impossible to manipulate git repositories properly on the MinGW platform. Would it be possible to use the git tree to manage the executable state? That way, all files would not have their executable state set by default on Windows. The problem with this is how then to set the executable state? Having a git version of chmod may not be a good idea, but then how else are you going to reliably and efficiently modify the files permissions on Windows? The rest of the patch looks good on a brief initial scan. - Reece