Skip to content

Commit

Permalink
Enable mailmap by default to match git log's behaviour (#1105)
Browse files Browse the repository at this point in the history
Also improve consistency when mailmap is disabled.

Closes #1104
  • Loading branch information
koutcher authored May 21, 2021
1 parent 9c90e76 commit 253eb01
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
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

0 comments on commit 253eb01

Please sign in to comment.