Community
Participate
Working Groups
I have text files chmod'd 644 through Cygwin (Everyone Read, me Read & Write through Windows Properties -> Security). If I edit a file and save it, this permission setting is preserved, and the file is marked with a ">". If I right-click and select Replace With -> HEAD Revision, the ">" goes away, but if I do "git status" from the command-line, the file is marked as modified due to a change in the permissions. They are now 755 (Everyone Read & Write, me Full Control in Windows Properties -> Security). I have core.fileMode=false in Git.
Maybe HEAD really contained an executable file. If you then say "replace with head" then obviously the filemode has to change. Maybe reproduce the problem again until you are just before the "replace with HEAD" step. Then in cygwin/msysgit/... switch to your repo-root and execute git ls-tree HEAD -- <path-of-your-file> git ls-files -s -- <path-of-your-file> ls -l <path-of-your-file> Then do the replace with HEAD and repeat the commands. What's the output?
Throughout this comment <file> is the relative path to the file from the root of the repo. Before "replace with HEAD" git ls-tree HEAD -- <file> 100644 blob bb813c1c7e21fe24ca6266ad40c6fd815fbab839 <file> git ls-files -s -- <file> 100644 bb813c1c7e21fe24ca6266ad40c6fd815fbab839 0 <file> ls -l <file> -rw-r--r-- 1 <me> <my-group> 3.2K Sep 18 07:49 <file> After "replace with HEAD" git ls-tree HEAD -- <file> 100644 blob bb813c1c7e21fe24ca6266ad40c6fd815fbab839 <file> git ls-files -s -- <file> 100644 bb813c1c7e21fe24ca6266ad40c6fd815fbab839 0 <file> ls -l <file> -rwxr-xr-x 1 <me> <my-group> 3.2K Sep 18 07:53 <file>