{"thread":{"id":"51468","subject":"[PATCH v4 0/3] use mailmap by default in git log","startedAt":"2019-07-11T18:37:35Z","lastAt":"2019-09-22T21:07:41Z","messageCount":12,"participants":["Ariadne Conill","Junio C Hamano","Martin Ågren","CB Bailey"],"isPatch":true,"patchVersion":4,"patchTotal":3},"messages":[{"id":"378850","messageId":"20190711183727.8058-1-ariadne@dereferenced.org","threadId":"51468","inReplyTo":null,"subject":"[PATCH v4 0/3] use mailmap by default in git log","fromName":"Ariadne Conill","fromEmail":"ariadne@dereferenced.org","sentAt":"2019-07-11T18:37:24Z","receivedAt":"2019-07-11T18:37:35Z","isPatch":true,"sender":{"key":"ariadne@dereferenced.org","avatar":"https://avatars.githubusercontent.com/u/1522444?v=4"},"body":"It is not uncommon for people to change their name or e-mail address.\nTo facilitate this, Git provides support for the `.mailmap` file,\nwhich contains a list of identities and previously used e-mail\naddresses that are associated with that identity.\n\nUnfortunately, while Git's support for the `.mailmap` file is generally\nexcellent, I recently discovered that `git log` does not treat the\nmail map file the same as the other tools, instead requiring an\nexplicit flag to use the mailmap file.\n\nI believe this is an unfortunate flaw, as the mailmap file should\nideally contain the most current known contact information for a\ncontributor, allowing anyone to contact the contributor about their\npatches in the future.\n\nThis should be the finished version of the patch set, thanks to\neveryone who has helped review it!\n\nNew in version 4:\n- Remove reundant `--no-use-mailmap` option, the option parsing\n  code automatically handles negation.\n- Update config/log.txt documentation to reflect the new default.\n\nNew in version 3:\n- Rework many mailmap tests to drop redundant `--use-mailmap` and\n  more rigorously test --no-use-mailmap and configuration variants.\n- Typo fixes in the commit messages.\n\nNew in version 2:\n- The `--no-use-mailmap` option, which complements `--use-mailmap`.\n- Tests for `--no-use-mailmap`.\n\nAriadne Conill (3):\n  log: use mailmap by default\n  log: document --no-use-mailmap option\n  tests: rework mailmap tests for git log\n\n Documentation/config/log.txt |  4 +--\n Documentation/git-log.txt    |  2 +-\n builtin/log.c                |  2 +-\n t/t4203-mailmap.sh           | 49 ++++++++++++++++++++++++++++++------\n 4 files changed, 45 insertions(+), 12 deletions(-)\n\n-- \n2.17.1\n\n"},{"id":"378851","messageId":"20190711183727.8058-2-ariadne@dereferenced.org","threadId":"51468","inReplyTo":"20190711183727.8058-1-ariadne@dereferenced.org","subject":"[PATCH v4 1/3] log: use mailmap by default","fromName":"Ariadne Conill","fromEmail":"ariadne@dereferenced.org","sentAt":"2019-07-11T18:37:25Z","receivedAt":"2019-07-11T18:37:36Z","isPatch":true,"sender":{"key":"ariadne@dereferenced.org","avatar":"https://avatars.githubusercontent.com/u/1522444?v=4"},"body":"The `git log` command shows the author and committer name recorded in\nthe git repository itself, while other commands respect `.mailmap`\nby default.  I believe this is a bad design: it causes log entries to\nreflect inaccurate information: anyone who changes their name or\ne-mail address will not have that change (recorded in mailmap file)\nreflected when using `git log` by default.\n\nAnyone who explicitly wants the current behaviour can clearly request\nit by setting the `log.mailmap` setting to `false` in their\n`.gitconfig` file.\n\nSigned-off-by: Ariadne Conill <ariadne@dereferenced.org>\n---\n builtin/log.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/builtin/log.c b/builtin/log.c\nindex 7c8767d3bc..3d2ce8fa3d 100644\n--- a/builtin/log.c\n+++ b/builtin/log.c\n@@ -47,7 +47,7 @@ static int default_follow;\n static int default_show_signature;\n static int decoration_style;\n static int decoration_given;\n-static int use_mailmap_config;\n+static int use_mailmap_config = 1;\n static const char *fmt_patch_subject_prefix = \"PATCH\";\n static const char *fmt_pretty;\n \n-- \n2.17.1\n\n"},{"id":"378852","messageId":"20190711183727.8058-3-ariadne@dereferenced.org","threadId":"51468","inReplyTo":"20190711183727.8058-1-ariadne@dereferenced.org","subject":"[PATCH v4 2/3] log: document --no-use-mailmap option","fromName":"Ariadne Conill","fromEmail":"ariadne@dereferenced.org","sentAt":"2019-07-11T18:37:26Z","receivedAt":"2019-07-11T18:37:38Z","isPatch":true,"sender":{"key":"ariadne@dereferenced.org","avatar":"https://avatars.githubusercontent.com/u/1522444?v=4"},"body":"When mailmap is enabled by default or by configuration, it may be\nuseful to override the default behaviour.  Previously, it was\npossible to enable the mailmap feature when it was disabled by\ndefault or in the configuration, but it was not possible to disable\nthe mailmap feature when it was enabled by default or by the\nconfiguration.\n\nThe previously undocumented --no-use-mailmap option equalizes this\nby allowing the user to explicitly enable or disable the mailmap\nfeature according to their requirements.\n\nSigned-off-by: Ariadne Conill <ariadne@dereferenced.org>\n---\n Documentation/config/log.txt | 4 ++--\n Documentation/git-log.txt    | 2 +-\n 2 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/config/log.txt b/Documentation/config/log.txt\nindex 78d9e4453a..8a01eed46b 100644\n--- a/Documentation/config/log.txt\n+++ b/Documentation/config/log.txt\n@@ -39,5 +39,5 @@ log.showSignature::\n \tlinkgit:git-whatchanged[1] assume `--show-signature`.\n \n log.mailmap::\n-\tIf true, makes linkgit:git-log[1], linkgit:git-show[1], and\n-\tlinkgit:git-whatchanged[1] assume `--use-mailmap`.\n+\tIf false, makes linkgit:git-log[1], linkgit:git-show[1], and\n+\tlinkgit:git-whatchanged[1] assume `--no-use-mailmap`.\ndiff --git a/Documentation/git-log.txt b/Documentation/git-log.txt\nindex b02e922dc3..b406bc4c48 100644\n--- a/Documentation/git-log.txt\n+++ b/Documentation/git-log.txt\n@@ -49,7 +49,7 @@ OPTIONS\n \tPrint out the ref name given on the command line by which each\n \tcommit was reached.\n \n---use-mailmap::\n+--[no-]use-mailmap::\n \tUse mailmap file to map author and committer names and email\n \taddresses to canonical real names and email addresses. See\n \tlinkgit:git-shortlog[1].\n-- \n2.17.1\n\n"},{"id":"378853","messageId":"20190711183727.8058-4-ariadne@dereferenced.org","threadId":"51468","inReplyTo":"20190711183727.8058-1-ariadne@dereferenced.org","subject":"[PATCH v4 3/3] tests: rework mailmap tests for git log","fromName":"Ariadne Conill","fromEmail":"ariadne@dereferenced.org","sentAt":"2019-07-11T18:37:27Z","receivedAt":"2019-07-11T18:37:39Z","isPatch":true,"sender":{"key":"ariadne@dereferenced.org","avatar":"https://avatars.githubusercontent.com/u/1522444?v=4"},"body":"In order to prove that the --no-use-mailmap option works as expected,\nwe add a test for it which runs with -c log.mailmap=true to ensure that\nthe option successfully negates the configured default.\n\nAdditionally, since --use-mailmap is now the default behaviour, we\nremove mentions of --use-mailmap from the tests, since they are\nredundant.  We also rework some tests to explicitly define the\nlog.mailmap variable in both true and false states.\n\nSigned-off-by: Ariadne Conill <ariadne@dereferenced.org>\n---\n t/t4203-mailmap.sh | 49 ++++++++++++++++++++++++++++++++++++++--------\n 1 file changed, 41 insertions(+), 8 deletions(-)\n\ndiff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh\nindex 43b1522ea2..3d6086ff96 100755\n--- a/t/t4203-mailmap.sh\n+++ b/t/t4203-mailmap.sh\n@@ -422,8 +422,8 @@ Author: Some Dude <some@dude.xx>\n Author: A U Thor <author@example.com>\n EOF\n \n-test_expect_success 'Log output with --use-mailmap' '\n-\tgit log --use-mailmap | grep Author >actual &&\n+test_expect_success 'Log output with mailmap enabled (default)' '\n+\tgit log | grep Author >actual &&\n \ttest_cmp expect actual\n '\n \n@@ -437,18 +437,33 @@ Author: Some Dude <some@dude.xx>\n Author: A U Thor <author@example.com>\n EOF\n \n-test_expect_success 'Log output with log.mailmap' '\n+test_expect_success 'Log output with log.mailmap enabled in config' '\n \tgit -c log.mailmap=True log | grep Author >actual &&\n \ttest_cmp expect actual\n '\n \n+cat >expect <<\\EOF\n+Author: CTO <cto@coompany.xx>\n+Author: claus <me@company.xx>\n+Author: santa <me@company.xx>\n+Author: nick2 <nick2@company.xx>\n+Author: nick2 <bugs@company.xx>\n+Author: nick1 <bugs@company.xx>\n+Author: A U Thor <author@example.com>\n+EOF\n+\n+test_expect_success 'Log output with log.mailmap disabled in config' '\n+\tgit -c log.mailmap=False log | grep Author >actual &&\n+\ttest_cmp expect actual\n+'\n+\n cat >expect <<\\EOF\n Author: Santa Claus <santa.claus@northpole.xx>\n Author: Santa Claus <santa.claus@northpole.xx>\n EOF\n \n-test_expect_success 'Grep author with --use-mailmap' '\n-\tgit log --use-mailmap --author Santa | grep Author >actual &&\n+test_expect_success 'Grep author with mailmap enabled (default)' '\n+\tgit log --author Santa | grep Author >actual &&\n \ttest_cmp expect actual\n '\n cat >expect <<\\EOF\n@@ -456,16 +471,34 @@ Author: Santa Claus <santa.claus@northpole.xx>\n Author: Santa Claus <santa.claus@northpole.xx>\n EOF\n \n-test_expect_success 'Grep author with log.mailmap' '\n+test_expect_success 'Grep author with log.mailmap enabled' '\n \tgit -c log.mailmap=True log --author Santa | grep Author >actual &&\n \ttest_cmp expect actual\n '\n \n-test_expect_success 'Only grep replaced author with --use-mailmap' '\n-\tgit log --use-mailmap --author \"<cto@coompany.xx>\" >actual &&\n+test_expect_success 'Grep author with log.mailmap disabled' '\n+\tgit -c log.mailmap=False log --author \"<santa.claus@northpole.xx>\" >actual &&\n+\ttest_must_be_empty actual\n+'\n+\n+test_expect_success 'Grep author with --no-use-mailmap' '\n+\tgit log --no-use-mailmap --author \"<santa.claus@northpole.xx>\" >actual &&\n \ttest_must_be_empty actual\n '\n \n+test_expect_success 'Only grep replaced author with mailmap enabled' '\n+\tgit log --author \"<cto@coompany.xx>\" >actual &&\n+\ttest_must_be_empty actual\n+'\n+cat >expect <<\\EOF\n+Author: santa <me@company.xx>\n+EOF\n+\n+test_expect_success 'Grep author with --no-use-mailmap + log.mailmap=True' '\n+\tgit -c log.mailmap=True log --no-use-mailmap --author santa | grep Author >actual &&\n+\ttest_cmp expect actual\n+'\n+\n # git blame\n cat >expect <<\\EOF\n ^OBJI (A U Thor     DATE 1) one\n-- \n2.17.1\n\n"},{"id":"378857","messageId":"xmqqy314qsgp.fsf@gitster-ct.c.googlers.com","threadId":"51468","inReplyTo":"20190711183727.8058-1-ariadne@dereferenced.org","subject":"Re: [PATCH v4 0/3] use mailmap by default in git log","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-07-11T19:30:46Z","receivedAt":"2019-07-11T19:30:52Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ariadne Conill <ariadne@dereferenced.org> writes:\n\n> It is not uncommon for people to change their name or e-mail address.\n> To facilitate this, Git provides support for the `.mailmap` file,\n> which contains a list of identities and previously used e-mail\n> addresses that are associated with that identity.\n>\n> Unfortunately, while Git's support for the `.mailmap` file is generally\n> excellent, I recently discovered that `git log` does not treat the\n> mail map file the same as the other tools, instead requiring an\n> explicit flag to use the mailmap file.\n\nMake \"the other tools\" a bit more explicit.  Making things\nconsistent is good but which way the consistency should go\nneeds more data than the above to decide.\n\nEven though I personally think it is an OK longer-term end goal, the\nexecution looks too hasty.  The normal way we handle a big behaviour\nchange like this is to do the following in steps, in different\nreleases:\n\n - In the first release, introduce an early adoptor option (say\n   log.usemailmap) that can be turned on by the user, but is off by\n   default.  IOW, the initial step is \"no change in behaviour,\n   unless you ask for it\".  This step also makes sure that the way\n   to disable it for those who opt into the option from the command\n   line (i.e.  the --no-use-mailmap option) works well.\n\n - In the second release, when \"git log\" is run without command line\n   \"--[no-]use-mailmap\" and \"log.usemailmap\" is not set by the user,\n   give warning about an upcoming flipping of the default, with an\n   advice message that the user can squelch the warning by setting\n   the option.\n\n - In the final release, flip the default and remove the warning.\n\nUsually there needs sufficient time between the second step and the\nthird step, so that people will not miss the warning.\n\nThanks.\n"},{"id":"378858","messageId":"CAN0heSqQTVzqceJTma4KJ28KLGk6Z0+2uheVPpQjRqc0YvWnFQ@mail.gmail.com","threadId":"51468","inReplyTo":"20190711183727.8058-4-ariadne@dereferenced.org","subject":"Re: [PATCH v4 3/3] tests: rework mailmap tests for git log","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2019-07-11T19:32:23Z","receivedAt":"2019-07-11T19:32:38Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"On Thu, 11 Jul 2019 at 20:39, Ariadne Conill <ariadne@dereferenced.org> wrote:\n>\n> In order to prove that the --no-use-mailmap option works as expected,\n> we add a test for it which runs with -c log.mailmap=true to ensure that\n> the option successfully negates the configured default.\n\nI believe that testing with `-c log.mailmap=true` is not doing much --\nif we ignored that config entirely, we would still produce the wanted\nresult. I think it's more important to test with \"...=false\". (Testing\nsomething like `-c log.mailmap=false -c log.mailmap=true` would\nbasically just test our config-parsing in general, and we don't need to\ndo that here -- there are other tests for that. Anyway, I digress.)\n\nYou or others might very well disagree with me, so feel free to wait\nfor a while to see if others chime in. Just so you don't have to change\nback and forth due to my whims.\n\n> Additionally, since --use-mailmap is now the default behaviour, we\n> remove mentions of --use-mailmap from the tests, since they are\n> redundant.  We also rework some tests to explicitly define the\n> log.mailmap variable in both true and false states.\n>\n> Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>\n> ---\n>  t/t4203-mailmap.sh | 49 ++++++++++++++++++++++++++++++++++++++--------\n>  1 file changed, 41 insertions(+), 8 deletions(-)\n>\n> diff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh\n> index 43b1522ea2..3d6086ff96 100755\n> --- a/t/t4203-mailmap.sh\n> +++ b/t/t4203-mailmap.sh\n> @@ -422,8 +422,8 @@ Author: Some Dude <some@dude.xx>\n>  Author: A U Thor <author@example.com>\n>  EOF\n>\n> -test_expect_success 'Log output with --use-mailmap' '\n> -       git log --use-mailmap | grep Author >actual &&\n> +test_expect_success 'Log output with mailmap enabled (default)' '\n> +       git log | grep Author >actual &&\n>         test_cmp expect actual\n>  '\n\nIt's a bit unfortunate that we're ignoring the exit status of `git log`\nsince that is the exact command we want to test here. I know you're just\nfollowing suit here, but if you're touching this line /anyway/, it might\nmake sense to rewrite this into\n\n  git log ... >out &&\n  grep Author out >actual &&\n  ...\n\n> -test_expect_success 'Log output with log.mailmap' '\n> +test_expect_success 'Log output with log.mailmap enabled in config' '\n>         git -c log.mailmap=True log | grep Author >actual &&\n>         test_cmp expect actual\n>  '\n\nThen the question is if you should change this line \"while at it\", or\nstart with a preparatory patch to first just convert all these \"git log\n| grep\" to the pattern I showed above, then have a patch 2/2 with the\nactual change you want to make. I'm sure there are different opinions\nhere about what is right and not. Anyway, I'm not the one to complain if\nyou just ignore all of these \"not so optimal\" lines that you're not\ntouching anyway.\n\nBTW, this is a test where I wonder if it's really worth running. We\nbasically just check that we won't choke completely on this redundant\nconfig.\n\n> +cat >expect <<\\EOF\n> +Author: CTO <cto@coompany.xx>\n> +Author: claus <me@company.xx>\n> +Author: santa <me@company.xx>\n> +Author: nick2 <nick2@company.xx>\n> +Author: nick2 <bugs@company.xx>\n> +Author: nick1 <bugs@company.xx>\n> +Author: A U Thor <author@example.com>\n> +EOF\n> +\n> +test_expect_success 'Log output with log.mailmap disabled in config' '\n> +       git -c log.mailmap=False log | grep Author >actual &&\n> +       test_cmp expect actual\n> +'\n\nNow this test, on the other hand, I really like having!\n\nAgain, you're just following suit: Nowadays, we try to run things like\n\"cat ...>expect ...\" as part of a \"test_expect_success\" block. Same\nquestion about how maybe one should first convert all existing\ninstances. And again, IMHO it's perfectly fine if you ignore the\nexisting ones, but do it the \"correct\" way for the ones you're adding.\n\n> +\n>  cat >expect <<\\EOF\n>  Author: Santa Claus <santa.claus@northpole.xx>\n>  Author: Santa Claus <santa.claus@northpole.xx>\n>  EOF\n>\n> -test_expect_success 'Grep author with --use-mailmap' '\n> -       git log --use-mailmap --author Santa | grep Author >actual &&\n> +test_expect_success 'Grep author with mailmap enabled (default)' '\n> +       git log --author Santa | grep Author >actual &&\n>         test_cmp expect actual\n>  '\n>  cat >expect <<\\EOF\n> @@ -456,16 +471,34 @@ Author: Santa Claus <santa.claus@northpole.xx>\n>  Author: Santa Claus <santa.claus@northpole.xx>\n>  EOF\n>\n> -test_expect_success 'Grep author with log.mailmap' '\n> +test_expect_success 'Grep author with log.mailmap enabled' '\n>         git -c log.mailmap=True log --author Santa | grep Author >actual &&\n>         test_cmp expect actual\n>  '\n\n(Again, I kind of wonder what this buys us.)\n\n> -test_expect_success 'Only grep replaced author with --use-mailmap' '\n> -       git log --use-mailmap --author \"<cto@coompany.xx>\" >actual &&\n> +test_expect_success 'Grep author with log.mailmap disabled' '\n> +       git -c log.mailmap=False log --author \"<santa.claus@northpole.xx>\" >actual &&\n> +       test_must_be_empty actual\n> +'\n\nNice.\n\n> +test_expect_success 'Grep author with --no-use-mailmap' '\n> +       git log --no-use-mailmap --author \"<santa.claus@northpole.xx>\" >actual &&\n>         test_must_be_empty actual\n>  '\n\nNice.\n\n> +test_expect_success 'Only grep replaced author with mailmap enabled' '\n> +       git log --author \"<cto@coompany.xx>\" >actual &&\n> +       test_must_be_empty actual\n> +'\n> +cat >expect <<\\EOF\n> +Author: santa <me@company.xx>\n> +EOF\n> +\n> +test_expect_success 'Grep author with --no-use-mailmap + log.mailmap=True' '\n> +       git -c log.mailmap=True log --no-use-mailmap --author santa | grep Author >actual &&\n> +       test_cmp expect actual\n> +'\n\nIt should be possible to drop \"-c log.mailmap=true\" from this.\n\nI think you could just squash these three commits into one. It would\ntell a consistent story about how the specification changes, and the\ntests and the implementation follow suit.\n\nOne last thing: I'm kind of assuming this change of default is something\nthat is actually wanted. I don't have strong opinions there, and maybe\nothers disagree. I know something like this has been discussed before,\nand I kind of suspect the reason it hasn't been done before is that\nnobody has done it -- not that it isn't wanted. You could probably find\nmore in the archives, e.g., at public-inbox.org/git.\n\nMartin\n"},{"id":"378859","messageId":"xmqqtvbsqs9x.fsf@gitster-ct.c.googlers.com","threadId":"51468","inReplyTo":"xmqqy314qsgp.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH v4 0/3] use mailmap by default in git log","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-07-11T19:34:50Z","receivedAt":"2019-07-11T19:34:55Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Even though I personally think it is an OK longer-term end goal, the\n> execution looks too hasty.  The normal way we handle a big behaviour\n> change like this is to do the following in steps, in different\n> releases:\n>\n>  - In the first release, introduce an early adoptor option (say\n>    log.usemailmap) that can be turned on by the user, but is off by\n>    default.  IOW, the initial step is \"no change in behaviour,\n>    unless you ask for it\".  This step also makes sure that the way\n>    to disable it for those who opt into the option from the command\n>    line (i.e.  the --no-use-mailmap option) works well.\n>\n>  - In the second release, when \"git log\" is run without command line\n>    \"--[no-]use-mailmap\" and \"log.usemailmap\" is not set by the user,\n>    give warning about an upcoming flipping of the default, with an\n>    advice message that the user can squelch the warning by setting\n>    the option.\n>\n>  - In the final release, flip the default and remove the warning.\n>\n> Usually there needs sufficient time between the second step and the\n> third step, so that people will not miss the warning.\n\nIIUC, we are between step 1 and step 2.  The configuration already\nexists and uses the safe (i.e. the same as before) default.  Your\nchange combines the step 2 and step 3 into one, which will not work.\n\nWhat we need at this point is the \"second release\" phase, i.e.\nadditional warnings without yet changing the default behaviour.\nAfter it is given to the end users and sufficient time passes, we\ncan flip the default.\n"},{"id":"378879","messageId":"CAAOiGNwGqtSoG8vsy+3gb0=tDVvA1YcA3FcDP0KQMa0=xp5j9w@mail.gmail.com","threadId":"51468","inReplyTo":"xmqqtvbsqs9x.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH v4 0/3] use mailmap by default in git log","fromName":"Ariadne Conill","fromEmail":"ariadne@dereferenced.org","sentAt":"2019-07-12T08:40:13Z","receivedAt":"2019-07-12T08:40:25Z","isPatch":true,"sender":{"key":"ariadne@dereferenced.org","avatar":"https://avatars.githubusercontent.com/u/1522444?v=4"},"body":"Hello,\n\nOn Thu, Jul 11, 2019 at 2:34 PM Junio C Hamano <gitster@pobox.com> wrote:\n>\n> Junio C Hamano <gitster@pobox.com> writes:\n>\n> > Even though I personally think it is an OK longer-term end goal, the\n> > execution looks too hasty.  The normal way we handle a big behaviour\n> > change like this is to do the following in steps, in different\n> > releases:\n> >\n> >  - In the first release, introduce an early adoptor option (say\n> >    log.usemailmap) that can be turned on by the user, but is off by\n> >    default.  IOW, the initial step is \"no change in behaviour,\n> >    unless you ask for it\".  This step also makes sure that the way\n> >    to disable it for those who opt into the option from the command\n> >    line (i.e.  the --no-use-mailmap option) works well.\n> >\n> >  - In the second release, when \"git log\" is run without command line\n> >    \"--[no-]use-mailmap\" and \"log.usemailmap\" is not set by the user,\n> >    give warning about an upcoming flipping of the default, with an\n> >    advice message that the user can squelch the warning by setting\n> >    the option.\n> >\n> >  - In the final release, flip the default and remove the warning.\n> >\n> > Usually there needs sufficient time between the second step and the\n> > third step, so that people will not miss the warning.\n>\n> IIUC, we are between step 1 and step 2.  The configuration already\n> exists and uses the safe (i.e. the same as before) default.  Your\n> change combines the step 2 and step 3 into one, which will not work.\n\nMakes sense.\n\n> What we need at this point is the \"second release\" phase, i.e.\n> additional warnings without yet changing the default behaviour.\n> After it is given to the end users and sufficient time passes, we\n> can flip the default.\n\nDo you have a proposed timetable for this?  I can add a warning\nmessage and we can proceed with the warning message for now and then\nflip the defaults later.  I just need to know what version you would\nlike to do the flip in (3.0?) so that I can write the warning message.\n\nAssuming the release you would like to flip the setting in is 3.0, I\nwould propose something like this:\n\nWarning: The `git log` command will default to using the mailmap file\nif present to map contributor names as of Git 3.0.  If you want to\nenable this behaviour now, use `git config --global log.mailmap true`\nto enable it.  If you want to explicitly disable this behaviour in the\nfuture, use `git config --global log.mailmap false` to disable it.\n\nYour thoughts on this message?\n\nAriadne\n"},{"id":"378884","messageId":"xmqqblxzqqw3.fsf@gitster-ct.c.googlers.com","threadId":"51468","inReplyTo":"CAAOiGNwGqtSoG8vsy+3gb0=tDVvA1YcA3FcDP0KQMa0=xp5j9w@mail.gmail.com","subject":"Re: [PATCH v4 0/3] use mailmap by default in git log","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-07-12T14:17:00Z","receivedAt":"2019-07-12T14:17:07Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ariadne Conill <ariadne@dereferenced.org> writes:\n\n>> What we need at this point is the \"second release\" phase, i.e.\n>> additional warnings without yet changing the default behaviour.\n>> After it is given to the end users and sufficient time passes, we\n>> can flip the default.\n>\n> Do you have a proposed timetable for this?  I can add a warning\n> message and we can proceed with the warning message for now and then\n> flip the defaults later.  I just need to know what version you would\n> like to do the flip in (3.0?) so that I can write the warning message.\n\nI do not think we usually do this without having to say \"at this\nrelease\" in such a warning.\n\nA recent example of a behaviour change that was backward\nincompatible was that we no longer allow\n\n\t$ git log -- ''\n\nto mean the same thing as\n\n\t$ git log -- .\n\nsince Git 2.16.  This change was initially planned in Git 2.11 timeframe,\nand we started warning when \"git log\" is used with an empty string\nas one of the pathspec elements on the command line in that\nrelease.  We kept warning for some releases and then at last at Git\n2.16 we flipped the switch.\n\nIt was started at d426430e (\"pathspec: warn on empty strings as\npathspec\", 2016-06-22) and then flipped at 9e4e8a64 (\"pathspec: die\non empty strings as pathspec\", 2017-06-06).  Run \"git show\" on these\ncommits, with pathspec \"pathspec.c\", to see exact wording we used.\n\nYou should be able to find other examples by looking in the\nDocumentation/Relnotes directory and finding backward compatibility\nnotes in there.\n\n> Warning: The `git log` command will default to using the mailmap file\n> if present to map contributor names as of Git 3.0.  If you want to\n> enable this behaviour now, use `git config --global log.mailmap true`\n> to enable it.  If you want to explicitly disable this behaviour in the\n> future, use `git config --global log.mailmap false` to disable it.\n\nOther than (1) the explicit \"as of ...\" which we do not have to say,\nand (2) use of \"--global\", as this is pretty much per-project\nconvention and is better handled by default per-repository basis,\nnto per-user basis, I think the proposed text tries to convey the\nright message.  But again, it is advisable to study how we phrased\nthese warning messages in past releases for different features and\nmimic them.\n\nThanks.\n"},{"id":"378885","messageId":"xmqq7e8nqpe1.fsf@gitster-ct.c.googlers.com","threadId":"51468","inReplyTo":"xmqqblxzqqw3.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH v4 0/3] use mailmap by default in git log","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-07-12T14:49:26Z","receivedAt":"2019-07-12T14:49:40Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> I do not think we usually do this without having to say \"at this\n> release\" in such a warning.\n\nSorry for horrible copy-editing that made the result say 100%\nopposite of what I meant.  I am bad at negations.\n\nBut I hope the mistake and the message I wanted to convey were\nobvious enough ;-) We've done this without giving exact timeframe in\nthe message.\n\n"},{"id":"378892","messageId":"CAAOiGNzXqcNmLO6GSdoVWc0zjGKKxz7tvr_xds=HfPNBSYFUrA@mail.gmail.com","threadId":"51468","inReplyTo":"xmqq7e8nqpe1.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH v4 0/3] use mailmap by default in git log","fromName":"Ariadne Conill","fromEmail":"ariadne@dereferenced.org","sentAt":"2019-07-12T16:17:15Z","receivedAt":"2019-07-12T16:17:28Z","isPatch":true,"sender":{"key":"ariadne@dereferenced.org","avatar":"https://avatars.githubusercontent.com/u/1522444?v=4"},"body":"Hello,\n\nOn Fri, Jul 12, 2019 at 9:49 AM Junio C Hamano <gitster@pobox.com> wrote:\n>\n> Junio C Hamano <gitster@pobox.com> writes:\n>\n> > I do not think we usually do this without having to say \"at this\n> > release\" in such a warning.\n>\n> Sorry for horrible copy-editing that made the result say 100%\n> opposite of what I meant.  I am bad at negations.\n>\n> But I hope the mistake and the message I wanted to convey were\n> obvious enough ;-) We've done this without giving exact timeframe in\n> the message.\n\nYes, I understood what you were proposing.  I believe I have added an\nadequate deprecation warning in the patches I just sent.\n\nThanks for your guidance on this!\n\nAriadne\n"},{"id":"382743","messageId":"20190922210003.4vczwqqucnaww3c6@hashpling.org","threadId":"51468","inReplyTo":"20190711183727.8058-1-ariadne@dereferenced.org","subject":"Re: [PATCH v4 0/3] use mailmap by default in git log","fromName":"CB Bailey","fromEmail":"cb@hashpling.org","sentAt":"2019-09-22T21:00:03Z","receivedAt":"2019-09-22T21:07:41Z","isPatch":true,"sender":{"key":"cb@hashpling.org","avatar":null},"body":"On Thu, Jul 11, 2019 at 01:37:24PM -0500, Ariadne Conill wrote:\n> It is not uncommon for people to change their name or e-mail address.\n> To facilitate this, Git provides support for the `.mailmap` file,\n> which contains a list of identities and previously used e-mail\n> addresses that are associated with that identity.\n> \n> Unfortunately, while Git's support for the `.mailmap` file is generally\n> excellent, I recently discovered that `git log` does not treat the\n> mail map file the same as the other tools, instead requiring an\n> explicit flag to use the mailmap file.\n> \n> I believe this is an unfortunate flaw, as the mailmap file should\n> ideally contain the most current known contact information for a\n> contributor, allowing anyone to contact the contributor about their\n> patches in the future.\n> \n> This should be the finished version of the patch set, thanks to\n> everyone who has helped review it!\n\nThank you very much for following up on this. I've been meaning to\nrevisit my RFC from last year on this topic for some time but\nunfortunately Git work has not been able to be a priority for me for\nsome time.\n\nI think that this patch everything that covered 'log' specifically that\nI'm aware of, 'shortlog' still has some issues that I'd like to address.\n\nCB\n"}]}