@matheusbsbs / matheus-bagliano / commits / 8503ee4394
Fork 0

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>

Alex Riesen committed May 1, 2007 at 00:26 UTC 8503ee4394dd47af136019bd8da53e5adec17e5d
1 file changed +3
mailmap.c
+3
@@ -17,6 +17,9 @@ int read_mailmap(struct path_list *map, const char *filename, char **repo_abbrev
17 int abblen = sizeof(abbrev) - 1;
18 int len = strlen(buffer);
19
20 + if (!repo_abbrev)
21 + continue;
22 +
23 if (len && buffer[len - 1] == '\n')
24 buffer[--len] = 0;
25 if (!strncmp(buffer, abbrev, abblen)) {