Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-12-22 23:26:33 +0300
committerJunio C Hamano <gitster@pobox.com>2014-12-22 23:26:34 +0300
commit168ab99d4c0a3587cee18ef8300f78d4c4344a66 (patch)
tree6c6dd1368cc9af586060bc77f49119a81d3f7629 /builtin/init-db.c
parent017820702142458b8d8ae1d1af1362e48b696377 (diff)
parentc7bf68d6b4b538f86e530f6b01eca7ff432ffbbb (diff)
Merge branch 'tb/config-core-filemode-check-on-broken-fs'
Some filesystems assign filemodes in a strange way, fooling then automatic "filemode trustability" check done during a new repository creation. * tb/config-core-filemode-check-on-broken-fs: init-db: improve the filemode trustability check
Diffstat (limited to 'builtin/init-db.c')
-rw-r--r--builtin/init-db.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/init-db.c b/builtin/init-db.c
index aab44d2e45..2619ca5881 100644
--- a/builtin/init-db.c
+++ b/builtin/init-db.c
@@ -256,6 +256,8 @@ static int create_default_files(const char *template_path)
!lstat(path, &st2) &&
st1.st_mode != st2.st_mode &&
!chmod(path, st1.st_mode));
+ if (filemode && !reinit && (st1.st_mode & S_IXUSR))
+ filemode = 0;
}
git_config_set("core.filemode", filemode ? "true" : "false");