diff options
author | Alex Riesen <raa.lkml@gmail.com> | 2007-05-01 00:26:36 +0200 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-04-30 16:57:50 -0700 |
commit | 8503ee4394dd47af136019bd8da53e5adec17e5d (patch) | |
tree | 22d69355ef77a6ffcb6b7a1ffcba52778af039a0 /mailmap.c | |
parent | 600682aaa12c56d55bd24233828205c43ece2ded (diff) | |
download | git-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.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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)) { |