summaryrefslogtreecommitdiff
path: root/mailmap.c
diff options
context:
space:
mode:
authorAlex Riesen <raa.lkml@gmail.com>2007-05-01 00:26:36 +0200
committerJunio C Hamano <junkio@cox.net>2007-04-30 16:57:50 -0700
commit8503ee4394dd47af136019bd8da53e5adec17e5d (patch)
tree22d69355ef77a6ffcb6b7a1ffcba52778af039a0 /mailmap.c
parent600682aaa12c56d55bd24233828205c43ece2ded (diff)
downloadgit-8503ee4394dd47af136019bd8da53e5adec17e5d.tar.gz
Fix read_mailmap to handle a caller uninterested in repo abbreviation
The only such a caller builtin-blame.c would pass NULL as the place where to store the abbreviation. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
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)) {