Re: [PATCH] config --global --edit: generate correct .gitconfig template

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] config --global --edit: generate correct .gitconfig template

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:04:40

Pete Harlan [off-list ref] writes:
When the user asks to edit an empty .gitconfig file, we learned to
generate a default version in 9830534e (config --global --edit: create
a template file if needed, 2014-07-25), but the generated config
mistakenly set core.user and core.email instead of user.name and
user.email.  Fix this.

Signed-off-by: Pete Harlan <redacted>
---
Thanks, I think this was already done in 7e110524 (config: fix
settings in default_user_config template, 2015-04-17).
quoted hunk
I ran up against this yesterday and it is easy enough to fix, but I
don't have time right now to write tests for it.

 builtin/config.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtin/config.c b/builtin/config.c
index d32c532..bfd3016 100644
--- a/builtin/config.c
+++ b/builtin/config.c
@@ -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());

Re: [PATCH] config --global --edit: generate correct .gitconfig template

From: Pete Harlan <hidden>
Date: 2016-06-15 23:04:40

On Wed, May 6, 2015 at 10:56 AM, Junio C Hamano [off-list ref] wrote:
Thanks, I think this was already done in 7e110524 (config: fix
settings in default_user_config template, 2015-04-17).
Whoops......indeed, I'll check more than just master next time, thanks.

--Pete
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help