Junio C Hamano <gitster@xxxxxxxxx> writes: > Jeff King <peff@xxxxxxxx> writes: > >>> + if (mailmap < 0) >>> mailmap = 0; >>> - } >> >> This should be "mailmap = 1" to match the commit message, no? (Which >> also implies we may want a new test). > > Gaa, of course. -- >8 -- From: Junio C Hamano <gitster@xxxxxxxxx> Date: Thu, 1 Aug 2019 14:48:34 -0700 Subject: [PATCH] log: really flip the --mailmap default Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx> --- builtin/log.c | 2 +- t/t4203-mailmap.sh | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/builtin/log.c b/builtin/log.c index 40b4cbf57d..02fa179077 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -205,7 +205,7 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix, userformat_find_requirements(NULL, &w); if (mailmap < 0) - mailmap = 0; + mailmap = 1; if (!rev->show_notes_given && (!rev->pretty_given || w.notes)) rev->show_notes = 1; diff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh index 43b1522ea2..ede0c292af 100755 --- a/t/t4203-mailmap.sh +++ b/t/t4203-mailmap.sh @@ -461,6 +461,11 @@ test_expect_success 'Grep author with log.mailmap' ' test_cmp expect actual ' +test_expect_success 'log.mailmap is true by default these days' ' + git log --author Santa | grep Author >actual && + test_cmp expect actual +' + test_expect_success 'Only grep replaced author with --use-mailmap' ' git log --use-mailmap --author "<cto@xxxxxxxxxxx>" >actual && test_must_be_empty actual -- 2.23.0-rc0-155-g5fbf3435fe