{"thread":{"id":"6126","subject":"git-1.4.4.3, also 1.5.0rc0: send-email gets empty From:","startedAt":"2006-12-27T13:43:19Z","lastAt":"2007-01-19T01:14:42Z","messageCount":4,"participants":["Horst H. von Brand","Quy Tonthat","Timur Tabi"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"30352","messageId":"200612271343.kBRDhKfA009927@laptop13.inf.utfsm.cl","threadId":"6126","inReplyTo":null,"subject":"git-1.4.4.3, also 1.5.0rc0: send-email gets empty From:","fromName":"Horst H. von Brand","fromEmail":"vonbrand@inf.utfsm.cl","sentAt":"2006-12-27T13:43:19Z","receivedAt":"2006-12-27T13:43:19Z","isPatch":false,"sender":{"key":"vonbrand@inf.utfsm.cl","avatar":"https://avatars.githubusercontent.com/u/211384?v=4"},"body":"I updated a local project, git-format-patch:ed, and then:\n\n  $ git send-email --to=olpc@listas.inf.utfsm.cl --no-signed-off-by-cc /tmp/0001-Add-myself-to-AUTHORS.txt\n  Who should the emails appear to be from? \n  Emails will be sent from: \n  Message-ID to be used as In-Reply-To for the first email? \n  /tmp/0001-Add-myself-to-AUTHORS.txt\n  Use of uninitialized value in concatenation (.) or string at /usr/bin/git-send-email line 392.\n  (mbox) Adding cc: Horst H. von Brand <vonbrand@inf.utfsm.cl> from line 'From: Horst H. von Brand <vonbrand@inf.utfsm.cl>'\n  OK. Log says:\n  Date: Wed, 27 Dec 2006 10:27:39 -0300\n  Sendmail: /usr/sbin/sendmail\n  From: \n  Subject: [PATCH] Add myself to AUTHORS\n  Cc: Horst H. von Brand <vonbrand@inf.utfsm.cl>\n  To: olpc@listas.inf.utfsm.cl\n\n  Result: OK\n\nI didn't add a From:, per manpage it is assumed to be GIT_COMMITER_IDENT\n(from 'git-var -l' this is 'Horst H. von Brand <vonbrand@inf.utfsm.cl> 1167226309 -0300').\nNote particularly the \"Emails will be sent from:\" line!\n\nThe resulting message is formed right (it has a From: header), so this is\njust a UI glitch.\n\nThe same output from 1.5.0rc0 here.\n-- \nDr. Horst H. von Brand                   User #22616 counter.li.org\nDepartamento de Informatica                    Fono: +56 32 2654431\nUniversidad Tecnica Federico Santa Maria             +56 32 2654239\nCasilla 110-V, Valparaiso, Chile               Fax:  +56 32 2797513\n"},{"id":"30353","messageId":"45928035.6000605@gmail.com","threadId":"6126","inReplyTo":"200612271343.kBRDhKfA009927@laptop13.inf.utfsm.cl","subject":"[PATCH] git-send-email: default value for \"From:\" field.","fromName":"Quy Tonthat","fromEmail":"qtonthat@gmail.com","sentAt":"2006-12-27T14:16:21Z","receivedAt":"2006-12-27T14:16:21Z","isPatch":true,"sender":{"key":"qtonthat@gmail.com","avatar":null},"body":"If user hits enter at the prompt for\n\"Who should the emails appear to be from?\",\nthe value for \"From:\" field was emptied instead of GIT_COMMITER_IDENT.\n\nSigned-off-by: Quy Tonthat <qtonthat@gmail.com>\n---\nIt seems the original code assumes readline to accept\nan extra argument for default value. I don't remember I ever encountered\nthat feature from readline. Is there anything like that out there ?\n\n git-send-email.perl |    5 ++---\n 1 files changed, 2 insertions(+), 3 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 4c87c20..ba39d39 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -178,11 +178,10 @@ my $prompting = 0;\n if (!defined $from) {\n \t$from = $author || $committer;\n \tdo {\n-\t\t$_ = $term->readline(\"Who should the emails appear to be from? \",\n-\t\t\t$from);\n+\t\t$_ = $term->readline(\"Who should the emails appear to be from? [$from] \");\n \t} while (!defined $_);\n \n-\t$from = $_;\n+\t$from = $_ if ($_);\n \tprint \"Emails will be sent from: \", $from, \"\\n\";\n \t$prompting++;\n }\n-- \n1.4.4.3.q5\n"},{"id":"32020","messageId":"45AFDAEA.607@freescale.com","threadId":"6126","inReplyTo":"45928035.6000605@gmail.com","subject":"Re: [PATCH] git-send-email: default value for \"From:\" field.","fromName":"Timur Tabi","fromEmail":"timur@freescale.com","sentAt":"2007-01-18T20:39:06Z","receivedAt":"2007-01-18T20:39:06Z","isPatch":true,"sender":{"key":"timur@freescale.com","avatar":null},"body":"Quy Tonthat wrote:\n> If user hits enter at the prompt for\n> \"Who should the emails appear to be from?\",\n> the value for \"From:\" field was emptied instead of GIT_COMMITER_IDENT.\n> \n> Signed-off-by: Quy Tonthat <qtonthat@gmail.com>\n> ---\n> It seems the original code assumes readline to accept\n> an extra argument for default value. I don't remember I ever encountered\n> that feature from readline. Is there anything like that out there ?\n\nI was thinking the same thing.  Almost every call to readline() in \ngit-send-email is like that, so could your patch below could be expanded to \ninclude the other instances?\n\n         $_ = $term->readline(\"Who should the emails be sent to? \",\n                         \"\");\n\n         $_ = $term->readline(\"What subject should the emails start with? \",\n                 $initial_subject);\n\n         $_= $term->readline(\"Message-ID to be used as In-Reply-To for the first \nemail? \",\n                 $initial_reply_to);\n\n-- \nTimur Tabi\nLinux Kernel Developer @ Freescale\n"},{"id":"32027","messageId":"45B01B82.9050707@gmail.com","threadId":"6126","inReplyTo":"45AFDAEA.607@freescale.com","subject":"Re: [PATCH] git-send-email: default value for \"From:\" field.","fromName":"Quy Tonthat","fromEmail":"qtonthat@gmail.com","sentAt":"2007-01-19T01:14:42Z","receivedAt":"2007-01-19T01:14:42Z","isPatch":true,"sender":{"key":"qtonthat@gmail.com","avatar":null},"body":"Timur Tabi wrote:\n> Quy Tonthat wrote:\n>> If user hits enter at the prompt for\n>> \"Who should the emails appear to be from?\",\n>> the value for \"From:\" field was emptied instead of GIT_COMMITER_IDENT.\n>>\n>> Signed-off-by: Quy Tonthat <qtonthat@gmail.com>\n>> ---\n>> It seems the original code assumes readline to accept\n>> an extra argument for default value. I don't remember I ever encountered\n>> that feature from readline. Is there anything like that out there ?\n> \n> I was thinking the same thing.  Almost every call to readline() in\n> git-send-email is like that, so could your patch below could be expanded\n> to include the other instances?\n> \n>         $_ = $term->readline(\"Who should the emails be sent to? \",\n>                         \"\");\n> \n>         $_ = $term->readline(\"What subject should the emails start with? \",\n>                 $initial_subject);\n> \n>         $_= $term->readline(\"Message-ID to be used as In-Reply-To for\n> the first email? \",\n>                 $initial_reply_to);\n> \nIt is correct to expand the fix to other instances, but that won't practically\nchange anything at run time (All those \"defaults\" are empty when passed to readline).\nI don't normally change somebody else's codes just for the sake of correctness or styles.\nQuy\n"}]}