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

Re: [PATCHv3 2/3] mailmap: use higher level string list functions

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 1, 2014, 00:47 UTC
Message-ID
<xmqq7fyctcur.fsf@gitster.dls.corp.google.com>
In-Reply-To
<CAPig+cRNuuDDBV0-TwANuiv+f_c1mfXp2Q4rF1Sj5mtJoLoqHQ@mail.gmail.com>
Eric Sunshine <sunshine@sunshineco.com> writes:
Show 6 quoted lines
> On Thu, Nov 27, 2014 at 1:44 PM, Michael Blume <blume.mike@gmail.com> wrote:
>> The variable index seems to be unused/uninitialized now -- it's still
>> printed in debug messages, but if I'm reading correctly, its contents are
>> going to be nonsense.
>
> Nice catch.
Let's do something like this squashed in, then.
 mailmap.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/mailmap.c b/mailmap.c
index 3b00a65..cb26af0 100644
--- a/mailmap.c
+++ b/mailmap.c
@@ -90,8 +90,8 @@ static void add_mapping(struct string_list *map,
 	}
 
 	if (old_name == NULL) {
-		debug_mm("mailmap: adding (simple) entry for %s at index %d\n",
-			 old_email, index);
+		debug_mm("mailmap: adding (simple) entry for '%s'\n", old_email);
+
 		/* Replace current name and new email for simple entry */
 		if (new_name) {
 			free(me->name);
@@ -103,8 +103,7 @@ static void add_mapping(struct string_list *map,
 		}
 	} else {
 		struct mailmap_info *mi = xcalloc(1, sizeof(struct mailmap_info));
-		debug_mm("mailmap: adding (complex) entry for %s at index %d\n",
-			 old_email, index);
+		debug_mm("mailmap: adding (complex) entry for '%s'\n", old_email);
 		if (new_name)
 			mi->name = xstrdup(new_name);
 		if (new_email)
Previous: Eric SunshineNext: Stefan Beller
Message 5 of 6 in “mailmap: use higher level string list functions”
  1. 2/3 mailmap: use higher level string list functionsStefan Beller, Nov 24, 2014
  2. Eric SunshineNov 25, 2014
  3. 2/3 mailmap: use higher level string list functionsStefan Beller, Nov 25, 2014
  4. Eric SunshineNov 27, 2014
  5. Junio C HamanoDec 1, 2014
  6. Stefan BellerDec 1, 2014

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.