summaryrefslogtreecommitdiff
path: root/mailmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'mailmap.c')
-rw-r--r--mailmap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mailmap.c b/mailmap.c
index c29e4e5349..38359a23b0 100644
--- a/mailmap.c
+++ b/mailmap.c
@@ -17,6 +17,9 @@ int read_mailmap(struct path_list *map, const char *filename, char **repo_abbrev
int abblen = sizeof(abbrev) - 1;
int len = strlen(buffer);
+ if (!repo_abbrev)
+ continue;
+
if (len && buffer[len - 1] == '\n')
buffer[--len] = 0;
if (!strncmp(buffer, abbrev, abblen)) {