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
Stefan Beller <stefanbeller@gmail.com>
Date
Dec 1, 2014, 02:33 UTC
Message-ID
<547BD36A.7050806@gmail.com>
In-Reply-To
<xmqq7fyctcur.fsf@gitster.dls.corp.google.com>
On 30.11.2014 16:47, Junio C Hamano wrote:
Show 10 quoted lines
> Eric Sunshine <sunshine@sunshineco.com> writes:
> 
>> 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.
Michael, thanks for catching that!
Junio, the squash-in looks fine with me.
Show 34 quoted lines
> 
>  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)
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
Previous: Junio C Hamano
Message 6 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.