log: flip the --mailmap default unconditionally

It turns out that being cautious to warn against upcoming default change was an unpopular behaviour, and such a care can easily be defeated by distro packagers to render it ineffective anyway. Just flip the default, with only a mention in the release notes. Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Aug 1, 2019 at 08:32 UTC 7ed20f596bde016ba199b82747108a431368f15a
3 files changed +4 -22
Documentation/RelNotes/2.23.0.txt
+3 -5
@@ -10,6 +10,9 @@ Backward compatibility note
10 prerequisite patches in an unstable way, which has been updated to
11 compute in a way that is compatible with "git patch-id --stable".
12
13 + * The "git log" command by default behaves as if the --mailmap option
14 + was given.
15 +
16
17 UI, Workflows & Features
18
@@ -91,11 +94,6 @@ UI, Workflows & Features
94 commit-graph files now, which allows the commit-graph files to be
95 updated incrementally.
96
94 - * The "git log" command learns to issue a warning when log.mailmap
95 - configuration is not set and --[no-]mailmap option is not used, to
96 - prepare users for future versions of Git that uses the mailmap by
97 - default.
98 -
97 * "git range-diff" output has been tweaked for easier identification
98 of which part of what file the patch shown is about.
99
builtin/log.c
+1 -15
@@ -156,16 +156,6 @@ static void cmd_log_init_defaults(struct rev_info *rev)
156 parse_date_format(default_date_mode, &rev->date_mode);
157 }
158
159 -static char warn_unspecified_mailmap_msg[] =
160 -N_("log.mailmap is not set; its implicit value will change in an\n"
161 - "upcoming release. To squelch this message and preserve current\n"
162 - "behaviour, set the log.mailmap configuration value to false.\n"
163 - "\n"
164 - "To squelch this message and adopt the new behaviour now, set the\n"
165 - "log.mailmap configuration value to true.\n"
166 - "\n"
167 - "See 'git help config' and search for 'log.mailmap' for further information.");
168 -
159 static void cmd_log_init_finish(int argc, const char **argv, const char *prefix,
160 struct rev_info *rev, struct setup_revision_opt *opt)
161 {
@@ -214,12 +204,8 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix,
204 memset(&w, 0, sizeof(w));
205 userformat_find_requirements(NULL, &w);
206
217 - if (mailmap < 0) {
218 - if (session_is_interactive() && !rev->pretty_given)
219 - warning("%s\n", _(warn_unspecified_mailmap_msg));
220 -
207 + if (mailmap < 0)
208 mailmap = 0;
222 - }
209
210 if (!rev->show_notes_given && (!rev->pretty_given || w.notes))
211 rev->show_notes = 1;
t/t7006-pager.sh
-2
@@ -7,8 +7,6 @@ test_description='Test automatic use of a pager.'
7 . "$TEST_DIRECTORY"/lib-terminal.sh
8
9 test_expect_success 'setup' '
10 - : squelch advice messages during the transition &&
11 - git config --global log.mailmap false &&
10 sane_unset GIT_PAGER GIT_PAGER_IN_USE &&
11 test_unconfig core.pager &&
12