{"thread":{"id":"7909","subject":"[PATCH] Fix read_mailmap to handle a caller uninterested in repo abbreviation","startedAt":"2007-04-30T22:26:36Z","lastAt":"2007-04-30T22:26:36Z","messageCount":1,"participants":["Alex Riesen"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"40763","messageId":"20070430222636.GB5000@steel.home","threadId":"7909","inReplyTo":null,"subject":"[PATCH] Fix read_mailmap to handle a caller uninterested in repo abbreviation","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-04-30T22:26:36Z","receivedAt":"2007-04-30T22:26:36Z","isPatch":true,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"The only such a caller builtin-blame.c would pass NULL as the place\nwhere to store the abbreviation.\n\nSigned-off-by: Alex Riesen <raa.lkml@gmail.com>\n---\n\nNo one seem to be using the feature. No wonder: it has exotic use\ncase, strange configuration, not documented, there is only one call\nsite (shortlog), and there, why does it not happen automatically anyway?\n\n mailmap.c |    3 +++\n 1 files changed, 3 insertions(+), 0 deletions(-)\n\ndiff --git a/mailmap.c b/mailmap.c\nindex c29e4e5..38359a2 100644\n--- a/mailmap.c\n+++ b/mailmap.c\n@@ -17,6 +17,9 @@ int read_mailmap(struct path_list *map, const char *filename, char **repo_abbrev\n \t\t\tint abblen = sizeof(abbrev) - 1;\n \t\t\tint len = strlen(buffer);\n \n+\t\t\tif (!repo_abbrev)\n+\t\t\t\tcontinue;\n+\n \t\t\tif (len && buffer[len - 1] == '\\n')\n \t\t\t\tbuffer[--len] = 0;\n \t\t\tif (!strncmp(buffer, abbrev, abblen)) {\n-- \n1.5.2.rc0.792.g7f4bd0\n"}]}