summaryrefslogtreecommitdiff
path: root/builtin/init-db.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2014-12-05 11:43:10 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-12-05 11:43:10 -0800
commita63373244060d8f7044e32a7a3d00211b62f7f7c (patch)
tree8bfc36cbb71fb129423b0a1ccab2de348fb0fccb /builtin/init-db.c
parentMerge branch 'jk/gitweb-with-newer-cgi-multi-param' (diff)
parentcreate_default_files(): don't set u+x bit on $GIT_DIR/config (diff)
downloadtgif-a63373244060d8f7044e32a7a3d00211b62f7f7c.tar.xz
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 587a5055ed..aab44d2e45 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");