Subject: Re: Problem with send-email

From: Timur Tabi <[email-masked]>
Date: Fri, 08 Sep 2006 17:57:27 -0500

Jakub Narebski wrote:
> Timur Tabi wrote:
> 
>> Everything works.  However, if I do this:
>>
>> git-send-email --from [email-masked] --to  \
>>    --smtp-server remotesmtp.freescale.net patchfile 
>>
> 
> What do you expect when you specify _empty_ To: header?

Sorry, that was a bad cut-and-paste.  I don't know what happened.  That line is supposed to read:

git-send-email --from [email-masked] --to [email-masked] --smtp-server remotesmtp.freescale.net patchfile

The error message I get is the same:

(mbox) Adding cc: Timur Tabi <[email-masked]> from line 'From: Timur Tabi <[email-masked]>'
(sob) Adding cc: Timur Tabi <[email-masked]> from line 'Signed-off-by: Timur Tabi <[email-masked]>
'
5.0.0 <Timur Tabi <[email-masked]>... Unbalanced '<'

I do have some news.  This problem goes away if I don't specify the --smtp-server parameter.

> 
> I use git-send-email from time to time; I always specify From:, 
> either entering it when prompted, or using --from parameter.
> The fact that it didn't fill default value from committer/author
> core.author+core.email is I guess a bug...

Like I said, I think the bug is in the call to readline().  Like I said, I don't know Perl, but from the documentation I have read, I don't think readline() takes two parameters.

     do {
         $_ = $term->readline("Who should the emails appear to be from? ",
             $from);
     } while (!defined $_);

     $from = $_;

$from does contain the correct value when readline() is called.  The problem is that $_ contains nothing, which causes $from to be erased.

-- 
Timur Tabi
Linux Kernel Developer @ Freescale