Skip to content

Commit

Permalink
Fix read_mailmap to handle a caller uninterested in repo abbreviation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alex Riesen authored and Junio C Hamano committed Apr 30, 2007
1 parent 600682a commit 8503ee4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mailmap.c
Original file line number Diff line number Diff line change
@@ -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)) {

0 comments on commit 8503ee4

Please sign in to comment.