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

Re: git send-email woes

From
Junio C Hamano <junkio@cox.net>
Date
Sep 26, 2006, 04:11 UTC
Message-ID
<7vvenbuv0t.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20060925215127.GA3965@uranus.ravnborg.org>
Sam Ravnborg <sam@ravnborg.org> writes:
Show 15 quoted lines
>> @@ -431,6 +431,11 @@ sub send_message
>>  	    $gitversion =~ s/^.* //;
>>  	}
>>  
>> +	my ($author_name) = ($from =~ /^(.*?)\s+</);
>> +	if ($author_name =~ /\./ && $author_name !~ /^".*"$/) {
>> +		my ($name, $addr) = ($from =~ /^(.*?)(\s+<.*)/);
>> +		$from = "\"$name\"$addr";
>> +	}
>>  	my $header = "From: $from
>>  To: $to
>>  Cc: $cc
>> 
> I would assume we had to do the same for all mail addresses?
> In this case also for $to and $cc and $reply_to.

I do not think so, although I admit I only had a cursory look at the code. In this part of the code, $to and $cc are coming from return value of unique_email_list sub, which cleanses each address with extract_valid_address sub. This sub does:

	A U Thor <foo@bar.baz> => foo@bar.baz
In other words, I think it is only "$from" that needs it.

I think $to and $cc should not strip out the human-readable name, but in this case it saved us extra trouble. Sigh...

Previous: Sam Ravnborg
Message 6 of 6 in “git send-email woes”
  1. Sam RavnborgSep 24, 2006
  2. Sam RavnborgSep 25, 2006
  3. Junio C HamanoSep 25, 2006
  4. David MillerSep 25, 2006
  5. Sam RavnborgSep 25, 2006
  6. Junio C HamanoSep 26, 2006

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.