summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2014-12-22 12:18:00 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-12-22 12:18:00 -0800
commite524fb497a0259cee4559f60d815218fc01ac466 (patch)
treeecfbe98babed896bf7b40bce00e191507afc3ec0 /builtin
parentMerge branch 'jk/gitweb-with-newer-cgi-multi-param' into maint (diff)
parentcreate_default_files(): don't set u+x bit on $GIT_DIR/config (diff)
downloadtgif-e524fb497a0259cee4559f60d815218fc01ac466.tar.xz
Merge branch 'mh/config-flip-xbit-back-after-checking' into maint
"git init" (hence "git clone") initialized the per-repository configuration file .git/config with x-bit by mistake. * mh/config-flip-xbit-back-after-checking: create_default_files(): don't set u+x bit on $GIT_DIR/config
Diffstat (limited to 'builtin')
-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");