summaryrefslogtreecommitdiff
path: root/mailmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'mailmap.c')
-rw-r--r--mailmap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mailmap.c b/mailmap.c
index eb77c6e77c..9bb9cf8b30 100644
--- a/mailmap.c
+++ b/mailmap.c
@@ -225,7 +225,8 @@ int read_mailmap(struct string_list *map)
if (!git_mailmap_blob && is_bare_repository())
git_mailmap_blob = "HEAD:.mailmap";
- err |= read_mailmap_file(map, ".mailmap");
+ if (!startup_info->have_repository || !is_bare_repository())
+ err |= read_mailmap_file(map, ".mailmap");
if (startup_info->have_repository)
err |= read_mailmap_blob(map, git_mailmap_blob);
err |= read_mailmap_file(map, git_mailmap_file);