@@ -68,9 +68,91 @@ names "clean-from-fs" and "smudge-to-fs" have been suggested for them.
6868### Reviews
6969-->
7070
71- <!-- -
7271### Support
73- -->
72+
73+ * [ http://thread.gmane.org/gmane.comp.version-control.git/295135 ] (Odd Difference Between Windows Git and Standard Git)
74+
75+ Jon Forrest sent an email about a ` git status ` behavior he sees on
76+ Windows, which is different than on Linux on a repository that is
77+ shared between the two environments. On Windows it looks like "every
78+ .pdf file and some .png files are modified".
79+
80+ Torsten Bögershausen, who has been working on Windows compatibility
81+ lately, especially related to line ending, first asked Jon some basic
82+ questions:
83+
84+ ```
85+ What does
86+ git diff
87+ say ?
88+
89+ What does
90+ git config -l | grep core
91+ say ?
92+
93+ And what does
94+ git ls-files --eol
95+ say?
96+ ```
97+
98+ As Jon answered:
99+
100+ ```
101+ old mode 100755
102+ new mode 100644
103+ ```
104+
105+ Torsten replied:
106+
107+ ```
108+ So the solution is to run
109+ git config core.filemode false
110+ ```
111+
112+ Jon replied:
113+
114+ ```
115+ This worked perfectly!
116+
117+ I wonder if this should be the default for Git for Windows.
118+ ```
119+
120+ To which Torsten replied:
121+
122+ ```
123+ It is.
124+ But you need to clone the repo under Windows.
125+
126+ I probably submit a patch some day, that core.filemode will be ignored
127+ under Windows.
128+ ```
129+
130+ From further discussions, it appeared that, when cloning a repo or
131+ when using ` git init ` , we probe to see if the executable bit "sticks"
132+ to the files and we set the 'core.filemode' config variable
133+ accordingly. That works well, but we don't probe at other times, so it
134+ doesn't work well for repos that are shared using a network filesystem
135+ or Dropbox.
136+
137+ To try to fix that, Torsten suggested a patch so that the
138+ 'core.filemode' setting is ignored under Windows. The problem with
139+ that, is that dictating "for all eternity that Git for Windows cannot
140+ determine the executable bit" might not be a good long term strategy,
141+ as "who knows for certain?".
142+
143+ Johannes Schindelin, the Git for Windows maintainer, suggested making
144+ the default 'core.filemode' setting platform-dependent. This last
145+ solution is already used for end of line setting. But it doesn't fix
146+ the problem when a repo created on Linux, where 'core.filemode' has
147+ been automatically set to true at init time, is shared.
148+
149+ Another solution would be to probe more often than just when cloning
150+ or using ` git init ` , but it appears that we don't want to do that for
151+ each command and it is not clear how to easily probe when there might
152+ not even be a '.git' directory.
153+
154+ The conclusion from the thread is that unfortunately it looks like
155+ there is no simple solution to avoid this kind of problems for now.
74156
75157## Releases
76158
0 commit comments