{"thread":{"id":"39261","subject":"[PATCH] config --global --edit: generate correct .gitconfig template","startedAt":"2015-05-06T17:41:17Z","lastAt":"2015-05-07T18:41:02Z","messageCount":5,"participants":["Pete Harlan","Junio C Hamano","Matthieu Moy"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"260671","messageId":"1430934077-20724-1-git-send-email-pchpublic88@gmail.com","threadId":"39261","inReplyTo":null,"subject":"[PATCH] config --global --edit: generate correct .gitconfig template","fromName":"Pete Harlan","fromEmail":"pchpublic88@gmail.com","sentAt":"2015-05-06T17:41:17Z","receivedAt":"2015-05-06T17:41:17Z","isPatch":true,"sender":{"key":"pchpublic88@gmail.com","avatar":null},"body":"When the user asks to edit an empty .gitconfig file, we learned to\ngenerate a default version in 9830534e (config --global --edit: create\na template file if needed, 2014-07-25), but the generated config\nmistakenly set core.user and core.email instead of user.name and\nuser.email.  Fix this.\n\nSigned-off-by: Pete Harlan <pchpublic88@gmail.com>\n---\n\nI ran up against this yesterday and it is easy enough to fix, but I\ndon't have time right now to write tests for it.\n\n builtin/config.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/builtin/config.c b/builtin/config.c\nindex d32c532..bfd3016 100644\n--- a/builtin/config.c\n+++ b/builtin/config.c\n@@ -455,9 +455,9 @@ static char *default_user_config(void)\n \tstruct strbuf buf = STRBUF_INIT;\n \tstrbuf_addf(&buf,\n \t\t    _(\"# This is Git's per-user configuration file.\\n\"\n-\t\t      \"[core]\\n\"\n+\t\t      \"[user]\\n\"\n \t\t      \"# Please adapt and uncomment the following lines:\\n\"\n-\t\t      \"#\tuser = %s\\n\"\n+\t\t      \"#\tname = %s\\n\"\n \t\t      \"#\temail = %s\\n\"),\n \t\t    ident_default_name(),\n \t\t    ident_default_email());\n-- \n2.4.0.rc3\n"},{"id":"260674","messageId":"xmqqzj5htws0.fsf@gitster.dls.corp.google.com","threadId":"39261","inReplyTo":"1430934077-20724-1-git-send-email-pchpublic88@gmail.com","subject":"Re: [PATCH] config --global --edit: generate correct .gitconfig template","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-05-06T17:56:31Z","receivedAt":"2015-05-06T17:56:31Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Pete Harlan <pchpublic88@gmail.com> writes:\n\n> When the user asks to edit an empty .gitconfig file, we learned to\n> generate a default version in 9830534e (config --global --edit: create\n> a template file if needed, 2014-07-25), but the generated config\n> mistakenly set core.user and core.email instead of user.name and\n> user.email.  Fix this.\n>\n> Signed-off-by: Pete Harlan <pchpublic88@gmail.com>\n> ---\n\nThanks, I think this was already done in 7e110524 (config: fix\nsettings in default_user_config template, 2015-04-17).\n\n>\n> I ran up against this yesterday and it is easy enough to fix, but I\n> don't have time right now to write tests for it.\n>\n>  builtin/config.c | 4 ++--\n>  1 file changed, 2 insertions(+), 2 deletions(-)\n>\n> diff --git a/builtin/config.c b/builtin/config.c\n> index d32c532..bfd3016 100644\n> --- a/builtin/config.c\n> +++ b/builtin/config.c\n> @@ -455,9 +455,9 @@ static char *default_user_config(void)\n>  \tstruct strbuf buf = STRBUF_INIT;\n>  \tstrbuf_addf(&buf,\n>  \t\t    _(\"# This is Git's per-user configuration file.\\n\"\n> -\t\t      \"[core]\\n\"\n> +\t\t      \"[user]\\n\"\n>  \t\t      \"# Please adapt and uncomment the following lines:\\n\"\n> -\t\t      \"#\tuser = %s\\n\"\n> +\t\t      \"#\tname = %s\\n\"\n>  \t\t      \"#\temail = %s\\n\"),\n>  \t\t    ident_default_name(),\n>  \t\t    ident_default_email());\n"},{"id":"260675","messageId":"CAM=ud8xTwmR-4TRCXkDJGGB0R6y8kdqN_=Px0H6PAC7BLN_wFA@mail.gmail.com","threadId":"39261","inReplyTo":"xmqqzj5htws0.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH] config --global --edit: generate correct .gitconfig template","fromName":"Pete Harlan","fromEmail":"pchpublic88@gmail.com","sentAt":"2015-05-06T18:10:59Z","receivedAt":"2015-05-06T18:10:59Z","isPatch":true,"sender":{"key":"pchpublic88@gmail.com","avatar":null},"body":"On Wed, May 6, 2015 at 10:56 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> Thanks, I think this was already done in 7e110524 (config: fix\n> settings in default_user_config template, 2015-04-17).\n\nWhoops......indeed, I'll check more than just master next time, thanks.\n\n--Pete\n"},{"id":"260718","messageId":"vpq38384vyw.fsf@anie.imag.fr","threadId":"39261","inReplyTo":"1430934077-20724-1-git-send-email-pchpublic88@gmail.com","subject":"Re: [PATCH] config --global --edit: generate correct .gitconfig template","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2015-05-07T08:45:27Z","receivedAt":"2015-05-07T08:45:27Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Pete Harlan <pchpublic88@gmail.com> writes:\n\n> When the user asks to edit an empty .gitconfig file, we learned to\n> generate a default version in 9830534e (config --global --edit: create\n> a template file if needed, 2014-07-25), but the generated config\n> mistakenly set core.user and core.email instead of user.name and\n> user.email.\n\nOops, indeed. I don't know how I could came up with such mistake and not\nnotice.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"260769","messageId":"xmqqbnhwp6wx.fsf@gitster.dls.corp.google.com","threadId":"39261","inReplyTo":"CAM=ud8xTwmR-4TRCXkDJGGB0R6y8kdqN_=Px0H6PAC7BLN_wFA@mail.gmail.com","subject":"Re: [PATCH] config --global --edit: generate correct .gitconfig template","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-05-07T18:41:02Z","receivedAt":"2015-05-07T18:41:02Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Pete Harlan <pchpublic88@gmail.com> writes:\n\n> On Wed, May 6, 2015 at 10:56 AM, Junio C Hamano <gitster@pobox.com> wrote:\n>> Thanks, I think this was already done in 7e110524 (config: fix\n>> settings in default_user_config template, 2015-04-17).\n>\n> Whoops......indeed, I'll check more than just master next time, thanks.\n\nBuilding 'next' and using it for your everyday Git need is a good\nthing to do.  You'll get well-eyeballed fixes earlier that way.\n"}]}