Skip to content

Commit 8503ee4

Browse files
raalkmlJunio C Hamano
authored andcommitted
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>
1 parent 600682a commit 8503ee4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mailmap.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ int read_mailmap(struct path_list *map, const char *filename, char **repo_abbrev
1717
int abblen = sizeof(abbrev) - 1;
1818
int len = strlen(buffer);
1919

20+
if (!repo_abbrev)
21+
continue;
22+
2023
if (len && buffer[len - 1] == '\n')
2124
buffer[--len] = 0;
2225
if (!strncmp(buffer, abbrev, abblen)) {

0 commit comments

Comments
 (0)