Code

git-commit: "read-tree -m HEAD" is not the right way to read-tree quickly
[git.git] / builtin-init-db.c
index 8e7540b6922696fb8100879eb9c4acf587f004db..12e43d0db4df0c40fe6375b38691684efcddad18 100644 (file)
@@ -231,7 +231,7 @@ static int create_default_files(const char *git_dir, const char *template_path)
        strcpy(path + len, "HEAD");
        reinit = !read_ref("HEAD", sha1);
        if (!reinit) {
-               if (create_symref("HEAD", "refs/heads/master") < 0)
+               if (create_symref("HEAD", "refs/heads/master", NULL) < 0)
                        exit(1);
        }
 
@@ -257,7 +257,9 @@ static int create_default_files(const char *git_dir, const char *template_path)
        }
        else {
                git_config_set("core.bare", "false");
-               git_config_set("core.logallrefupdates", "true");
+               /* allow template config file to override the default */
+               if (log_all_ref_updates == -1)
+                   git_config_set("core.logallrefupdates", "true");
        }
        return reinit;
 }