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>maint
							parent
							
								
									600682aaa1
								
							
						
					
					
						commit
						8503ee4394
					
				|  | @ -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)) { | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Alex Riesen
						Alex Riesen