Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable mailmap by default to match git log's behaviour #1105

Merged
merged 1 commit into from
May 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ log_open(struct view *view, enum open_flags flags)
{
const char *log_argv[] = {
"git", "log", encoding_arg, commit_order_arg(), "--cc",
"--stat", "%(logargs)", "%(cmdlineargs)", "%(revargs)",
"--no-color", "--", "%(fileargs)", NULL
"--stat", use_mailmap_arg(), "%(logargs)", "%(cmdlineargs)",
"%(revargs)", "--no-color", "--", "%(fileargs)", NULL
};

return begin_update(view, NULL, log_argv, flags);
Expand Down
2 changes: 1 addition & 1 deletion src/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ diff_context_arg()
const char *
use_mailmap_arg()
{
return opt_mailmap ? "--use-mailmap" : "";
return opt_mailmap ? "--use-mailmap" : "--no-use-mailmap";
}

const char *
Expand Down
2 changes: 1 addition & 1 deletion test/main/filter-args-test
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ git rev-parse --git-dir --is-inside-work-tree --show-cdup --show-prefix HEAD --s
EOF

assert_equals 'log.trace' <<EOF
git log --encoding=UTF-8 --topo-order --exclude=refs/remotes/origin/* --exclude=refs/heads/master --all --date=raw --parents --no-color --show-notes --pretty=format:commit %m %H %P%x00%an <%ae> %ad%x00%s%x00%N -- common tracer
git log --encoding=UTF-8 --topo-order --exclude=refs/remotes/origin/* --exclude=refs/heads/master --all --date=raw --parents --no-color --show-notes --pretty=format:commit %m %H %P%x00%aN <%aE> %ad%x00%s%x00%N -- common tracer
EOF

assert_equals 'filtered.screen' <<EOF
Expand Down
2 changes: 1 addition & 1 deletion tigrc
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ set show-notes = yes # When non-bool passed as `--show-notes=...` (diff)
#set blame-options = -C -C -C # User-defined options for `tig blame` (git-blame)
#set log-options = --pretty=raw # User-defined options for `tig log` (git-log)
#set main-options = -n 1000 # User-defined options for `tig` (git-log)
#set mailmap = yes # Use .mailmap to show canonical name and email address
set mailmap = yes # Use .mailmap to show canonical name and email address

# Misc
set start-on-head = no # Start with cursor on HEAD commit
Expand Down