Allow default core.logallrefupdates to be overridden with template's config
authorAlex Riesen <raa.lkml@gmail.com>
Tue, 23 Jan 2007 15:51:18 +0000 (16:51 +0100)
committerJunio C Hamano <junkio@cox.net>
Thu, 25 Jan 2007 01:33:25 +0000 (17:33 -0800)
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-init-db.c

index 8e7540b6922696fb8100879eb9c4acf587f004db..186548938193ac125d9d9f89080cec640d0a46e0 100644 (file)
@@ -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;
 }