Skip to contentSkip to conversation

core.filemode may need manual action

PATCH In review Torsten Bögershausen 2 participants 3 messages Jun 15, 2016 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 core.filemode may need manual action

core.filemode is set automatically when a repo is created.
But when a repo is exported via CIFS or cygwin is mixed with Git for Windows or Eclipse core.filemode may better be set manually to false. Update and improve the documentation

---

Thanks for careful reading.
Changes since V1:
- The '+' at an otherwise empty line generates an empty line in html, so s/^$/+/
- Changed msygit into Git for Windows
- Mention Eclipse
- Minor changes in the wording, remove one comma
- Remove the "The default is true, except "
This line is maybe confusing.
"The default is true" is not wrong as such, we have
int trust_executable_bit = 1;
But: these days most repos have core.filemode defined, so describing this default gives not much new information to the user. (please correct me if that is wrong)
Especially the "except" is not really helpful, because the default is always true, and git.git will always probe. Any thoughts ?
Now we mention the probing 2 times, I am not 100% happy with this, please see V2B

Another thing is that both Git for Windows and Eclipse can not handle the filemode, and should silently ignore the flag, which is a different patch.

 Documentation/config.txt | 23 +++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)
Documentation/config.txt +19 -4
index 04a1e2f..959dc11 100644
@@ -204,12 +204,27 @@ advice.*::
 --
 
 core.fileMode::
-	If false, the executable bit differences between the index and
-	the working tree are ignored; useful on broken filesystems like FAT.
+	Tells Git if the executable bit of files in the working tree
+	is to be honored.
++
+	Some filesystems lose the executable bit when a file that is
+	marked as executable is checked out, or checks out an
+	non-executable file with executable bit on.  "git init" and
+	"git clone" probe the filesystem to see if it records
+	executable bit correctly when they create a new repository
+	and this variable is automatically set as necessary.
++
+	A repository, however, may be on a filesystem that handles
+	the filemode correctly, and this variable is set to 'true'
+	when created, but later may be made accessible from another
+	environment that loses the filemode (e.g. exporting ext4 via
+	CIFS mount, visiting a Cygwin created repository with
+	Git for Windows or Eclipse).
+	In such a case it may be necessary to set this variable to 'false'.
 	See linkgit:git-update-index[1].
 +
-The default is true, except linkgit:git-clone[1] or linkgit:git-init[1]
-will probe and set core.fileMode false if appropriate when the
+linkgit:git-clone[1] or linkgit:git-init[1]
+will probe and set core.fileMode to true or false when the
 repository is created.
 
 core.ignorecase::
Signature · 1 line
2.1.0.rc2.210.g636bceb
#1 lore raw
Quoted 2 lines · Torsten Bögershausen

- The '+' at an otherwise empty line generates an empty line in html, so s/^$/+/

I think the rule is actually that you cannot have multiple paragraphs in an enumerated list the same "headword double-colon and then indented paragraph" way, and need to unindent second and subsequent paragraphs, and have "+" before each of them, i.e.

        .--------------------------------
        |core.fileMode::
        |	Here is my first paragraph.
        |+
        |Here is my second one.
        .--------------------------------

That is how the existing "The default is true, except..." paragraph is done, and I was hoping that you would notice it and follow that example.

#2 lore raw
Quoted 17 lines · Junio C Hamano
Quoted 2 lines · Torsten Bögershausen

- The '+' at an otherwise empty line generates an empty line in html, so s/^$/+/

I think the rule is actually that you cannot have multiple paragraphs in an enumerated list the same "headword double-colon and then indented paragraph" way, and need to unindent second and subsequent paragraphs, and have "+" before each of them, i.e.

        .--------------------------------
        |core.fileMode::
        |	Here is my first paragraph.
        |+
        |Here is my second one.
        .--------------------------------
Quoted 3 lines

That is how the existing "The default is true, except..." paragraph is done, and I was hoping that you would notice it and follow that example.

I took your v2b and reformatted to follow the above; the result should be queued on 'pu'.

Thanks.