Skip to content

Commit 7ed20f5

Browse files
committed
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 <[email protected]>
1 parent f36d08d commit 7ed20f5

File tree

3 files changed

+4
-22
lines changed

3 files changed

+4
-22
lines changed

Documentation/RelNotes/2.23.0.txt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ Backward compatibility note
1010
prerequisite patches in an unstable way, which has been updated to
1111
compute in a way that is compatible with "git patch-id --stable".
1212

13+
* The "git log" command by default behaves as if the --mailmap option
14+
was given.
15+
1316

1417
UI, Workflows & Features
1518

@@ -91,11 +94,6 @@ UI, Workflows & Features
9194
commit-graph files now, which allows the commit-graph files to be
9295
updated incrementally.
9396

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-
9997
* "git range-diff" output has been tweaked for easier identification
10098
of which part of what file the patch shown is about.
10199

builtin/log.c

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -156,16 +156,6 @@ static void cmd_log_init_defaults(struct rev_info *rev)
156156
parse_date_format(default_date_mode, &rev->date_mode);
157157
}
158158

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-
169159
static void cmd_log_init_finish(int argc, const char **argv, const char *prefix,
170160
struct rev_info *rev, struct setup_revision_opt *opt)
171161
{
@@ -214,12 +204,8 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix,
214204
memset(&w, 0, sizeof(w));
215205
userformat_find_requirements(NULL, &w);
216206

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)
221208
mailmap = 0;
222-
}
223209

224210
if (!rev->show_notes_given && (!rev->pretty_given || w.notes))
225211
rev->show_notes = 1;

t/t7006-pager.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ test_description='Test automatic use of a pager.'
77
. "$TEST_DIRECTORY"/lib-terminal.sh
88

99
test_expect_success 'setup' '
10-
: squelch advice messages during the transition &&
11-
git config --global log.mailmap false &&
1210
sane_unset GIT_PAGER GIT_PAGER_IN_USE &&
1311
test_unconfig core.pager &&
1412

0 commit comments

Comments
 (0)