summaryrefslogtreecommitdiff
path: root/builtin/init-db.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-12-05 19:43:10 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-12-05 19:43:10 (GMT)
commita63373244060d8f7044e32a7a3d00211b62f7f7c (patch)
tree8bfc36cbb71fb129423b0a1ccab2de348fb0fccb /builtin/init-db.c
parent0b0cd3792049ffad85a626b0f82d78c4cf4e59a2 (diff)
parent1f32ecffd864ea5b339883f94463b0b69f4aeb35 (diff)
downloadgit-a63373244060d8f7044e32a7a3d00211b62f7f7c.zip
git-a63373244060d8f7044e32a7a3d00211b62f7f7c.tar.gz
git-a63373244060d8f7044e32a7a3d00211b62f7f7c.tar.bz2
Merge branch 'mh/config-flip-xbit-back-after-checking'
* mh/config-flip-xbit-back-after-checking: create_default_files(): don't set u+x bit on $GIT_DIR/config
Diffstat (limited to 'builtin/init-db.c')
-rw-r--r--builtin/init-db.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/init-db.c b/builtin/init-db.c
index 587a505..aab44d2 100644
--- a/builtin/init-db.c
+++ b/builtin/init-db.c
@@ -254,7 +254,8 @@ static int create_default_files(const char *template_path)
struct stat st2;
filemode = (!chmod(path, st1.st_mode ^ S_IXUSR) &&
!lstat(path, &st2) &&
- st1.st_mode != st2.st_mode);
+ st1.st_mode != st2.st_mode &&
+ !chmod(path, st1.st_mode));
}
git_config_set("core.filemode", filemode ? "true" : "false");