diff options
Diffstat (limited to 'builtin-init-db.c')
-rw-r--r-- | builtin-init-db.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/builtin-init-db.c b/builtin-init-db.c index bbef820e47..22729f01ad 100644 --- a/builtin-init-db.c +++ b/builtin-init-db.c @@ -252,9 +252,13 @@ static int create_default_files(const char *git_dir, const char *template_path) } git_config_set("core.filemode", filemode ? "true" : "false"); - /* Enable logAllRefUpdates if a working tree is attached */ - if (!is_bare_git_dir(git_dir)) + if (is_bare_repository()) { + git_config_set("core.bare", "true"); + } + else { + git_config_set("core.bare", "false"); git_config_set("core.logallrefupdates", "true"); + } return reinit; } |