git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Problem with send-email
@ 2006-09-08 21:02 Timur Tabi
  2006-09-08 22:25 ` Jakub Narebski
  0 siblings, 1 reply; 7+ messages in thread
From: Timur Tabi @ 2006-09-08 21:02 UTC (permalink / raw)
  To: git

Does anyone actually use git-send-email?  It's been so broken for me for months that I can't help but think that.

Problem #1:

I don't know Perl, but I think there's something wrong with this code:

if (!defined $from) {
	$from = $author || $committer;
         print "$from\n";
	do {
		$_ = $term->readline("Who should the emails appear to be from? ",
			$from);
	} while (!defined $_);

	$from = $_;
	print "Emails will be sent from: ", $from, "\n";
	$prompting++;
}

I don't think the call to readline() is working.  Specifically, the last parameter, $from, is being ignored.  When I call git-send-email without specifying a --from parameter, this code is executed.  But this is what I see:

Timur Tabi <timur@freescale.com>
Who should the emails appear to be from?
Emails will be sent from:

This happens when I press ENTER at the "Who should the emails appear to be from?" prompt.  I'm expecting it to assign the default value, which is displayed right above it.  But instead, $from is erased, and so my email doesn't have a From: line.

Problem #2:

I cannot use send-email to send a patch to anyone but myself.  If I do this:

git-send-email --from timur@freescale.com --to timur@freescale.com --smtp-server remotesmtp.freescale.net patchfile

Everything works.  However, if I do this:

git-send-email --from timur@freescale.com --to  --smtp-server remotesmtp.freescale.net patchfile

I get this:

(mbox) Adding cc: Timur Tabi <timur@freescale.com> from line 'From: Timur Tabi <timur@freescale.com>'
(sob) Adding cc: Timur Tabi <timur@freescale.com> from line 'Signed-off-by: Timur Tabi <timur@freescale.com>'
5.0.0 <Timur Tabi <timur@freescale.com>... Unbalanced '<'

I think that last line is a response from the SMTP server.  My guess is that there's something wrong with this line:

		print $sm "$header\n$message";

Maybe my SMTP server sees the "From: Timur Tabi <timur@freescale.com>" that's at the top of $message and gets confused?



-- 
Timur Tabi
Linux Kernel Developer @ Freescale

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Problem with send-email
@ 2006-09-08 21:04 Timur Tabi
  0 siblings, 0 replies; 7+ messages in thread
From: Timur Tabi @ 2006-09-08 21:04 UTC (permalink / raw)
  To: git

Does anyone actually use git-send-email?  It's been so broken for me for months that I can't help but think that.

Problem #1:

I don't know Perl, but I think there's something wrong with this code:

if (!defined $from) {
	$from = $author || $committer;
         print "$from\n";
	do {
		$_ = $term->readline("Who should the emails appear to be from? ",
			$from);
	} while (!defined $_);

	$from = $_;
	print "Emails will be sent from: ", $from, "\n";
	$prompting++;
}

I don't think the call to readline() is working.  Specifically, the last parameter, $from, is being ignored.  When I call git-send-email without specifying a --from parameter, this code is executed.  But this is what I see:

Timur Tabi <timur@freescale.com>
Who should the emails appear to be from?
Emails will be sent from:

This happens when I press ENTER at the "Who should the emails appear to be from?" prompt.  I'm expecting it to assign the default value, which is displayed right above it.  But instead, $from is erased, and so my email doesn't have a From: line.

Problem #2:

I cannot use send-email to send a patch to anyone but myself.  If I do this:

git-send-email --from timur@freescale.com --to timur@freescale.com --smtp-server remotesmtp.freescale.net patchfile

Everything works.  However, if I do this:

git-send-email --from timur@freescale.com --to  --smtp-server remotesmtp.freescale.net patchfile

I get this:

(mbox) Adding cc: Timur Tabi <timur@freescale.com> from line 'From: Timur Tabi <timur@freescale.com>'
(sob) Adding cc: Timur Tabi <timur@freescale.com> from line 'Signed-off-by: Timur Tabi <timur@freescale.com>'
5.0.0 <Timur Tabi <timur@freescale.com>... Unbalanced '<'

I think that last line is a response from the SMTP server.  My guess is that there's something wrong with this line:

		print $sm "$header\n$message";

Maybe my SMTP server sees the "From: Timur Tabi <timur@freescale.com>" that's at the top of $message and gets confused?



-- 
Timur Tabi
Linux Kernel Developer @ Freescale

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Problem with send-email
@ 2006-09-08 21:11 Timur Tabi
  0 siblings, 0 replies; 7+ messages in thread
From: Timur Tabi @ 2006-09-08 21:11 UTC (permalink / raw)
  To: git

I'm having two problems with git-send-email.

Problem #1:

I don't know Perl, but I think there's something wrong with this code:

if (!defined $from) {
	$from = $author || $committer;
         print "$from\n";
	do {
		$_ = $term->readline("Who should the emails appear to be from? ",
			$from);
	} while (!defined $_);

	$from = $_;
	print "Emails will be sent from: ", $from, "\n";
	$prompting++;
}

I don't think the call to readline() is working.  Specifically, the last parameter, $from, is being ignored.  When I call git-send-email without specifying a --from parameter, this code is executed.  But this is what I see:

Timur Tabi <timur@freescale.com>
Who should the emails appear to be from?
Emails will be sent from:

This happens when I press ENTER at the "Who should the emails appear to be from?" prompt.  I'm expecting it to assign the default value, which is displayed right above it.  But instead, $from is erased, and so my email doesn't have a From: line.

Problem #2:

I cannot use send-email to send a patch to anyone but myself.  If I do this:

git-send-email --from timur@freescale.com --to timur@freescale.com --smtp-server remotesmtp.freescale.net patchfile

Everything works.  However, if I do this:

git-send-email --from timur@freescale.com --to  --smtp-server remotesmtp.freescale.net patchfile

I get this:

(mbox) Adding cc: Timur Tabi <timur@freescale.com> from line 'From: Timur Tabi <timur@freescale.com>'
(sob) Adding cc: Timur Tabi <timur@freescale.com> from line 'Signed-off-by: Timur Tabi <timur@freescale.com>'
5.0.0 <Timur Tabi <timur@freescale.com>... Unbalanced '<'

I think that last line is a response from the SMTP server.  My guess is that there's something wrong with this line:

		print $sm "$header\n$message";

Maybe my SMTP server sees the "From: Timur Tabi <timur@freescale.com>" that's at the top of $message and gets confused?

-- 
Timur Tabi
Linux Kernel Developer @ Freescale

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Problem with send-email
@ 2006-09-08 21:13 Timur Tabi
  2006-09-08 21:35 ` Timur Tabi
  0 siblings, 1 reply; 7+ messages in thread
From: Timur Tabi @ 2006-09-08 21:13 UTC (permalink / raw)
  To: git

I'm having two problems with git-send-email.

Problem #1:

I don't know Perl, but I think there's something wrong with this code:

if (!defined $from) {
	$from = $author || $committer;
         print "$from\n";
	do {
		$_ = $term->readline("Who should the emails appear to be from? ",
			$from);
	} while (!defined $_);

	$from = $_;
	print "Emails will be sent from: ", $from, "\n";
	$prompting++;
}

I don't think the call to readline() is working.  Specifically, the last parameter, $from, is being ignored.  When I call git-send-email without specifying a --from parameter, this code is executed.  But this is what I see:

Timur Tabi <timur@freescale.com>
Who should the emails appear to be from?
Emails will be sent from:

This happens when I press ENTER at the "Who should the emails appear to be from?" prompt.  I'm expecting it to assign the default value, which is displayed right above it.  But instead, $from is erased, and so my email doesn't have a From: line.

Problem #2:

I cannot use send-email to send a patch to anyone but myself.  If I do this:

git-send-email --from timur@freescale.com --to timur@freescale.com --smtp-server remotesmtp.freescale.net patchfile

Everything works.  However, if I do this:

git-send-email --from timur@freescale.com --to  --smtp-server remotesmtp.freescale.net patchfile

I get this:

(mbox) Adding cc: Timur Tabi <timur@freescale.com> from line 'From: Timur Tabi <timur@freescale.com>'
(sob) Adding cc: Timur Tabi <timur@freescale.com> from line 'Signed-off-by: Timur Tabi <timur@freescale.com>'
5.0.0 <Timur Tabi <timur@freescale.com>... Unbalanced '<'

I think that last line is a response from the SMTP server.  My guess is that there's something wrong with this line:

		print $sm "$header\n$message";

Maybe my SMTP server sees the "From: Timur Tabi <timur@freescale.com>" that's at the top of $message and gets confused?

-- 
Timur Tabi
Linux Kernel Developer @ Freescale

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Problem with send-email
  2006-09-08 21:13 Problem with send-email Timur Tabi
@ 2006-09-08 21:35 ` Timur Tabi
  0 siblings, 0 replies; 7+ messages in thread
From: Timur Tabi @ 2006-09-08 21:35 UTC (permalink / raw)
  To: git

Sorry about the reposts, but my company's email server told me it rejected my posts because it thought they were spam.  I wasn't expecting the server to hold on to them and them send them out later.

-- 
Timur Tabi
Linux Kernel Developer @ Freescale

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Problem with send-email
  2006-09-08 21:02 Timur Tabi
@ 2006-09-08 22:25 ` Jakub Narebski
  2006-09-08 22:57   ` Timur Tabi
  0 siblings, 1 reply; 7+ messages in thread
From: Jakub Narebski @ 2006-09-08 22:25 UTC (permalink / raw)
  To: git

Timur Tabi wrote:

> Everything works.  However, if I do this:
> 
> git-send-email --from timur@freescale.com --to  \
>    --smtp-server remotesmtp.freescale.net patchfile 
> 

What do you expect when you specify _empty_ To: header?

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...
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Problem with send-email
  2006-09-08 22:25 ` Jakub Narebski
@ 2006-09-08 22:57   ` Timur Tabi
  0 siblings, 0 replies; 7+ messages in thread
From: Timur Tabi @ 2006-09-08 22:57 UTC (permalink / raw)
  To: git

Jakub Narebski wrote:
> Timur Tabi wrote:
> 
>> Everything works.  However, if I do this:
>>
>> git-send-email --from timur@freescale.com --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 timur@freescale.com --to timur@tabi.org --smtp-server remotesmtp.freescale.net patchfile

The error message I get is the same:

(mbox) Adding cc: Timur Tabi <timur@freescale.com> from line 'From: Timur Tabi <timur@freescale.com>'
(sob) Adding cc: Timur Tabi <timur@freescale.com> from line 'Signed-off-by: Timur Tabi <timur@freescale.com>
'
5.0.0 <Timur Tabi <timur@freescale.com>... 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-09-08 22:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-08 21:13 Problem with send-email Timur Tabi
2006-09-08 21:35 ` Timur Tabi
  -- strict thread matches above, loose matches on Subject: below --
2006-09-08 21:11 Timur Tabi
2006-09-08 21:04 Timur Tabi
2006-09-08 21:02 Timur Tabi
2006-09-08 22:25 ` Jakub Narebski
2006-09-08 22:57   ` Timur Tabi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).