git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Fix read_mailmap to handle a caller uninterested in repo abbreviation

From
Alex Riesen <raa.lkml@gmail.com>
Date
Apr 30, 2007, 22:26 UTC
Message-ID
<20070430222636.GB5000@steel.home>

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>
---

No one seem to be using the feature. No wonder: it has exotic use case, strange configuration, not documented, there is only one call site (shortlog), and there, why does it not happen automatically anyway?

 mailmap.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/mailmap.c b/mailmap.c
index c29e4e5..38359a2 100644
--- a/mailmap.c
+++ b/mailmap.c
@@ -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)) {
-- 
1.5.2.rc0.792.g7f4bd0
Message 1 of 1 in “Fix read_mailmap to handle a caller uninterested in repo abbreviation”
  1. Fix read_mailmap to handle a caller uninterested in repo abbreviationAlex Riesen, Apr 30, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.