Merge branch 'ah/usage-strings' into maint
[gitweb.git] / builtin / config.c
index d32c5327e53e14a7af72e4ec91efc1b42a414659..a58f99c2d78f8e06a2e9df7af155af7aa8eaf4c8 100644 (file)
@@ -455,9 +455,9 @@ static char *default_user_config(void)
        struct strbuf buf = STRBUF_INIT;
        strbuf_addf(&buf,
                    _("# This is Git's per-user configuration file.\n"
-                     "[core]\n"
+                     "[user]\n"
                      "# Please adapt and uncomment the following lines:\n"
-                     "#        user = %s\n"
+                     "#        name = %s\n"
                      "#        email = %s\n"),
                    ident_default_name(),
                    ident_default_email());
@@ -488,10 +488,8 @@ int cmd_config(int argc, const char **argv, const char *prefix)
        }
 
        if (use_global_config) {
-               char *user_config = NULL;
-               char *xdg_config = NULL;
-
-               home_config_paths(&user_config, &xdg_config, "config");
+               char *user_config = expand_user_path("~/.gitconfig");
+               char *xdg_config = xdg_config_home("config");
 
                if (!user_config)
                        /*