Subject: Re: Git in GSoC 2014 Suggestion: core.filemode always false for cygwin

From: Torsten Bögershausen <[email-masked]>
Date: Wed, 26 Feb 2014 18:15:50 +0100

On 2014-02-25 16.41, Jeff King wrote:
> I'm pleased to announce that Git has been accepted to this year's Google
> Summer of Code.
I'm not sure if this is the right way to propose mini projects,
but in case the answer is not no, may I suggest one:

Motivation, the problem:
Since commit c28facd216b501d41ca76f 
"cygwin: stop forcing core.filemode=false" 
Git under cygwin initializes repos with core.filemode = true under NTFS

This allows a smooth workflow, when e.g. *.sh files are pushed and pulled between
Cygwin, Linux/Unix or Mac OS.

However when I visit such a repo under Mingw, then Mingw reads core.filemode =true,
but is unable to detect whether the X-bit is set, and reads it as not set.

Therefore "git status" thinks that e.g. all *.sh files have lost the executable
bit, abd reports them as changed.

Proposal:
Under Mingw, keep trust_executable_bit always false, regardless what
core.filemode says.
Activate  NO_TRUSTABLE_FILEMODE in config.mak.uname for Mingw
(currently it is not used to anything)

Keep the logic in init-db.c to initialize core.filemode = false under Mingw 

Language: C
Difficulty: easy