{"thread":{"id":"47625","subject":"[PATCH v2 1/2] send-email: Rename variable for clarity","startedAt":"2018-01-17T18:08:17Z","lastAt":"2018-01-18T11:00:15Z","messageCount":6,"participants":["Christian Ludwig","Junio C Hamano","Ævar Arnfjörð Bjarmason","Martin Ågren"],"isPatch":true,"patchVersion":2,"patchTotal":2},"messages":[{"id":"336704","messageId":"20180117180801.31049-1-chrissicool@gmail.com","threadId":"47625","inReplyTo":null,"subject":"[PATCH v2 1/2] send-email: Rename variable for clarity","fromName":"Christian Ludwig","fromEmail":"chrissicool@googlemail.com","sentAt":"2018-01-17T18:08:00Z","receivedAt":"2018-01-17T18:08:17Z","isPatch":true,"sender":{"key":"chrissicool@gmail.com","avatar":"https://avatars.githubusercontent.com/u/232590?v=4"},"body":"The SMTP protocol has both, the 'Reply-To' and the 'In-Reply-To' header\nfields. We only use the latter. To avoid confusion, rename the variable\nfor it.\n\nSigned-off-by: Christian Ludwig <chrissicool@gmail.com>\n---\n git-send-email.perl | 38 +++++++++++++++++++-------------------\n 1 file changed, 19 insertions(+), 19 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex edcc6d346..0c07f48d5 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -166,13 +166,13 @@ my $re_encoded_word = qr/=\\?($re_token)\\?($re_token)\\?($re_encoded_text)\\?=/;\n \n # Variables we fill in automatically, or via prompting:\n my (@to,$no_to,@initial_to,@cc,$no_cc,@initial_cc,@bcclist,$no_bcc,@xh,\n-\t$initial_reply_to,$initial_subject,@files,\n+\t$initial_in_reply_to,$initial_subject,@files,\n \t$author,$sender,$smtp_authpass,$annotate,$use_xmailer,$compose,$time);\n \n my $envelope_sender;\n \n # Example reply to:\n-#$initial_reply_to = ''; #<20050203173208.GA23964@foobar.com>';\n+#$initial_in_reply_to = ''; #<20050203173208.GA23964@foobar.com>';\n \n my $repo = eval { Git->repository() };\n my @repo = $repo ? ($repo) : ();\n@@ -314,7 +314,7 @@ die __(\"--dump-aliases incompatible with other options\\n\")\n     if !$help and $dump_aliases and @ARGV;\n $rc = GetOptions(\n \t\t    \"sender|from=s\" => \\$sender,\n-                    \"in-reply-to=s\" => \\$initial_reply_to,\n+                    \"in-reply-to=s\" => \\$initial_in_reply_to,\n \t\t    \"subject=s\" => \\$initial_subject,\n \t\t    \"to=s\" => \\@initial_to,\n \t\t    \"to-cmd=s\" => \\$to_cmd,\n@@ -676,7 +676,7 @@ if ($compose) {\n \n \tmy $tpl_sender = $sender || $repoauthor || $repocommitter || '';\n \tmy $tpl_subject = $initial_subject || '';\n-\tmy $tpl_reply_to = $initial_reply_to || '';\n+\tmy $tpl_in_reply_to = $initial_in_reply_to || '';\n \n \tprint $c <<EOT1, Git::prefix_lines(\"GIT: \", __ <<EOT2), <<EOT3;\n From $tpl_sender # This line is ignored.\n@@ -689,7 +689,7 @@ Clear the body content if you don't wish to send a summary.\n EOT2\n From: $tpl_sender\n Subject: $tpl_subject\n-In-Reply-To: $tpl_reply_to\n+In-Reply-To: $tpl_in_reply_to\n \n EOT3\n \tfor my $f (@files) {\n@@ -736,7 +736,7 @@ EOT3\n \t\t\t\tquote_subject($subject, $compose_encoding) .\n \t\t\t\t\"\\n\";\n \t\t} elsif (/^In-Reply-To:\\s*(.+)\\s*$/i) {\n-\t\t\t$initial_reply_to = $1;\n+\t\t\t$initial_in_reply_to = $1;\n \t\t\tnext;\n \t\t} elsif (/^From:\\s*(.+)\\s*$/i) {\n \t\t\t$sender = $1;\n@@ -872,16 +872,16 @@ sub expand_one_alias {\n @initial_cc = process_address_list(@initial_cc);\n @bcclist = process_address_list(@bcclist);\n \n-if ($thread && !defined $initial_reply_to && $prompting) {\n-\t$initial_reply_to = ask(\n+if ($thread && !defined $initial_in_reply_to && $prompting) {\n+\t$initial_in_reply_to = ask(\n \t\t__(\"Message-ID to be used as In-Reply-To for the first email (if any)? \"),\n \t\tdefault => \"\",\n \t\tvalid_re => qr/\\@.*\\./, confirm_only => 1);\n }\n-if (defined $initial_reply_to) {\n-\t$initial_reply_to =~ s/^\\s*<?//;\n-\t$initial_reply_to =~ s/>?\\s*$//;\n-\t$initial_reply_to = \"<$initial_reply_to>\" if $initial_reply_to ne '';\n+if (defined $initial_in_reply_to) {\n+\t$initial_in_reply_to =~ s/^\\s*<?//;\n+\t$initial_in_reply_to =~ s/>?\\s*$//;\n+\t$initial_in_reply_to = \"<$initial_in_reply_to>\" if $initial_in_reply_to ne '';\n }\n \n if (!defined $smtp_server) {\n@@ -901,7 +901,7 @@ if ($compose && $compose > 0) {\n }\n \n # Variables we set as part of the loop over files\n-our ($message_id, %mail, $subject, $reply_to, $references, $message,\n+our ($message_id, %mail, $subject, $in_reply_to, $references, $message,\n \t$needs_confirm, $message_num, $ask_default);\n \n sub extract_valid_address {\n@@ -1310,9 +1310,9 @@ Message-Id: $message_id\n \tif ($use_xmailer) {\n \t\t$header .= \"X-Mailer: git-send-email $gitversion\\n\";\n \t}\n-\tif ($reply_to) {\n+\tif ($in_reply_to) {\n \n-\t\t$header .= \"In-Reply-To: $reply_to\\n\";\n+\t\t$header .= \"In-Reply-To: $in_reply_to\\n\";\n \t\t$header .= \"References: $references\\n\";\n \t}\n \tif (@xh) {\n@@ -1489,8 +1489,8 @@ EOF\n \treturn 1;\n }\n \n-$reply_to = $initial_reply_to;\n-$references = $initial_reply_to || '';\n+$in_reply_to = $initial_in_reply_to;\n+$references = $initial_in_reply_to || '';\n $subject = $initial_subject;\n $message_num = 0;\n \n@@ -1700,9 +1700,9 @@ foreach my $t (@files) {\n \n \t# set up for the next message\n \tif ($thread && $message_was_sent &&\n-\t\t($chain_reply_to || !defined $reply_to || length($reply_to) == 0 ||\n+\t\t($chain_reply_to || !defined $in_reply_to || length($in_reply_to) == 0 ||\n \t\t$message_num == 1)) {\n-\t\t$reply_to = $message_id;\n+\t\t$in_reply_to = $message_id;\n \t\tif (length $references > 0) {\n \t\t\t$references .= \"\\n $message_id\";\n \t\t} else {\n-- \n2.15.1\n\n"},{"id":"336705","messageId":"20180117180801.31049-2-chrissicool@gmail.com","threadId":"47625","inReplyTo":"20180117180801.31049-1-chrissicool@gmail.com","subject":"[PATCH v2 2/2] send-email: Support separate Reply-To address","fromName":"Christian Ludwig","fromEmail":"chrissicool@googlemail.com","sentAt":"2018-01-17T18:08:01Z","receivedAt":"2018-01-17T18:08:20Z","isPatch":true,"sender":{"key":"chrissicool@gmail.com","avatar":"https://avatars.githubusercontent.com/u/232590?v=4"},"body":"In some projects contributions from groups are only accepted from a\ncommon group email address. But every individual may want to recieve\nreplies to her own personal address. That's what we have 'Reply-To'\nheaders for in SMTP.\n\nIntroduce an optional '--reply-to' command line option. Unfortunately\nthe $reply_to variable name was already taken for the 'In-Reply-To'\nheader field. To reduce code churn, use $reply_address as variable\nname instead.\n\nSigned-off-by: Christian Ludwig <chrissicool@gmail.com>\n---\n Documentation/git-send-email.txt       |  5 +++++\n contrib/completion/git-completion.bash |  2 +-\n git-send-email.perl                    | 18 +++++++++++++++++-\n t/t9001-send-email.sh                  |  2 ++\n 4 files changed, 25 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt\nindex 8060ea35c..71ef97ba9 100644\n--- a/Documentation/git-send-email.txt\n+++ b/Documentation/git-send-email.txt\n@@ -84,6 +84,11 @@ See the CONFIGURATION section for `sendemail.multiEdit`.\n \tthe value of GIT_AUTHOR_IDENT, or GIT_COMMITTER_IDENT if that is not\n \tset, as returned by \"git var -l\".\n \n+--reply-to=<address>::\n+\tSpecify the address where replies from recipients should go to.\n+\tUse this if replies to messages should go to another address than what\n+\tis specified with the --from parameter.\n+\n --in-reply-to=<identifier>::\n \tMake the first mail (or all the mails with `--no-thread`) appear as a\n \treply to the given Message-Id, which avoids breaking threads to\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex 3683c772c..2a0dc4eef 100644\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -2081,7 +2081,7 @@ _git_send_email ()\n \t\t\t--compose --confirm= --dry-run --envelope-sender\n \t\t\t--from --identity\n \t\t\t--in-reply-to --no-chain-reply-to --no-signed-off-by-cc\n-\t\t\t--no-suppress-from --no-thread --quiet\n+\t\t\t--no-suppress-from --no-thread --quiet --reply-to\n \t\t\t--signed-off-by-cc --smtp-pass --smtp-server\n \t\t\t--smtp-server-port --smtp-encryption= --smtp-user\n \t\t\t--subject --suppress-cc= --suppress-from --thread --to\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 0c07f48d5..9bf758307 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -56,6 +56,7 @@ git send-email --dump-aliases\n     --[no-]cc               <str>  * Email Cc:\n     --[no-]bcc              <str>  * Email Bcc:\n     --subject               <str>  * Email \"Subject:\"\n+    --reply-to              <str>  * Email \"Reply-To:\"\n     --in-reply-to           <str>  * Email \"In-Reply-To:\"\n     --[no-]xmailer                 * Add \"X-Mailer:\" header (default).\n     --[no-]annotate                * Review each patch that will be sent in an editor.\n@@ -166,7 +167,7 @@ my $re_encoded_word = qr/=\\?($re_token)\\?($re_token)\\?($re_encoded_text)\\?=/;\n \n # Variables we fill in automatically, or via prompting:\n my (@to,$no_to,@initial_to,@cc,$no_cc,@initial_cc,@bcclist,$no_bcc,@xh,\n-\t$initial_in_reply_to,$initial_subject,@files,\n+\t$initial_in_reply_to,$reply_to,$initial_subject,@files,\n \t$author,$sender,$smtp_authpass,$annotate,$use_xmailer,$compose,$time);\n \n my $envelope_sender;\n@@ -315,6 +316,7 @@ die __(\"--dump-aliases incompatible with other options\\n\")\n $rc = GetOptions(\n \t\t    \"sender|from=s\" => \\$sender,\n                     \"in-reply-to=s\" => \\$initial_in_reply_to,\n+\t\t    \"reply-to=s\" => \\$reply_to,\n \t\t    \"subject=s\" => \\$initial_subject,\n \t\t    \"to=s\" => \\@initial_to,\n \t\t    \"to-cmd=s\" => \\$to_cmd,\n@@ -677,6 +679,7 @@ if ($compose) {\n \tmy $tpl_sender = $sender || $repoauthor || $repocommitter || '';\n \tmy $tpl_subject = $initial_subject || '';\n \tmy $tpl_in_reply_to = $initial_in_reply_to || '';\n+\tmy $tpl_reply_to = $reply_to || '';\n \n \tprint $c <<EOT1, Git::prefix_lines(\"GIT: \", __ <<EOT2), <<EOT3;\n From $tpl_sender # This line is ignored.\n@@ -688,6 +691,7 @@ for the patch you are writing.\n Clear the body content if you don't wish to send a summary.\n EOT2\n From: $tpl_sender\n+Reply-To: $tpl_reply_to\n Subject: $tpl_subject\n In-Reply-To: $tpl_in_reply_to\n \n@@ -738,6 +742,9 @@ EOT3\n \t\t} elsif (/^In-Reply-To:\\s*(.+)\\s*$/i) {\n \t\t\t$initial_in_reply_to = $1;\n \t\t\tnext;\n+\t\t} elsif (/^Reply-To:\\s*(.+)\\s*$/i) {\n+\t\t\t$reply_to = $1;\n+\t\t\tnext;\n \t\t} elsif (/^From:\\s*(.+)\\s*$/i) {\n \t\t\t$sender = $1;\n \t\t\tnext;\n@@ -884,6 +891,12 @@ if (defined $initial_in_reply_to) {\n \t$initial_in_reply_to = \"<$initial_in_reply_to>\" if $initial_in_reply_to ne '';\n }\n \n+if (defined $reply_to) {\n+\t$reply_to =~ s/^\\s+|\\s+$//g;\n+\t($reply_to) = expand_aliases($reply_to);\n+\t$reply_to = sanitize_address($reply_to);\n+}\n+\n if (!defined $smtp_server) {\n \tmy @sendmail_paths = qw( /usr/sbin/sendmail /usr/lib/sendmail );\n \tpush @sendmail_paths, map {\"$_/sendmail\"} split /:/, $ENV{PATH};\n@@ -1315,6 +1328,9 @@ Message-Id: $message_id\n \t\t$header .= \"In-Reply-To: $in_reply_to\\n\";\n \t\t$header .= \"References: $references\\n\";\n \t}\n+\tif ($reply_to) {\n+\t\t$header .= \"Reply-To: $reply_to\\n\";\n+\t}\n \tif (@xh) {\n \t\t$header .= join(\"\\n\", @xh) . \"\\n\";\n \t}\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex 81869d891..c62318a78 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -205,6 +205,7 @@ Message-Id: MESSAGE-ID-STRING\n X-Mailer: X-MAILER-STRING\n In-Reply-To: <unique-message-id@example.com>\n References: <unique-message-id@example.com>\n+Reply-To: Reply <reply@example.com>\n \n Result: OK\n EOF\n@@ -297,6 +298,7 @@ test_expect_success $PREREQ 'Show all headers' '\n \t\t--dry-run \\\n \t\t--suppress-cc=sob \\\n \t\t--from=\"Example <from@example.com>\" \\\n+\t\t--reply-to=\"Reply <reply@example.com>\" \\\n \t\t--to=to@example.com \\\n \t\t--cc=cc@example.com \\\n \t\t--bcc=bcc@example.com \\\n-- \n2.15.1\n\n"},{"id":"336712","messageId":"xmqq8tcws3v6.fsf@gitster.mtv.corp.google.com","threadId":"47625","inReplyTo":"20180117180801.31049-1-chrissicool@gmail.com","subject":"Re: [PATCH v2 1/2] send-email: Rename variable for clarity","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-01-17T19:05:17Z","receivedAt":"2018-01-17T19:05:24Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Christian Ludwig <chrissicool@googlemail.com> writes:\n\n> The SMTP protocol has both, the 'Reply-To' and the 'In-Reply-To' header\n> fields. We only use the latter. To avoid confusion, rename the variable\n> for it.\n>\n> Signed-off-by: Christian Ludwig <chrissicool@gmail.com>\n> ---\n\nMakes sense.\n\n>  git-send-email.perl | 38 +++++++++++++++++++-------------------\n>  1 file changed, 19 insertions(+), 19 deletions(-)\n>\n> diff --git a/git-send-email.perl b/git-send-email.perl\n> index edcc6d346..0c07f48d5 100755\n> --- a/git-send-email.perl\n> +++ b/git-send-email.perl\n> @@ -166,13 +166,13 @@ my $re_encoded_word = qr/=\\?($re_token)\\?($re_token)\\?($re_encoded_text)\\?=/;\n>  \n>  # Variables we fill in automatically, or via prompting:\n>  my (@to,$no_to,@initial_to,@cc,$no_cc,@initial_cc,@bcclist,$no_bcc,@xh,\n> -\t$initial_reply_to,$initial_subject,@files,\n> +\t$initial_in_reply_to,$initial_subject,@files,\n>  \t$author,$sender,$smtp_authpass,$annotate,$use_xmailer,$compose,$time);\n>  \n>  my $envelope_sender;\n>  \n>  # Example reply to:\n> -#$initial_reply_to = ''; #<20050203173208.GA23964@foobar.com>';\n> +#$initial_in_reply_to = ''; #<20050203173208.GA23964@foobar.com>';\n>  \n>  my $repo = eval { Git->repository() };\n>  my @repo = $repo ? ($repo) : ();\n> @@ -314,7 +314,7 @@ die __(\"--dump-aliases incompatible with other options\\n\")\n>      if !$help and $dump_aliases and @ARGV;\n>  $rc = GetOptions(\n>  \t\t    \"sender|from=s\" => \\$sender,\n> -                    \"in-reply-to=s\" => \\$initial_reply_to,\n> +                    \"in-reply-to=s\" => \\$initial_in_reply_to,\n>  \t\t    \"subject=s\" => \\$initial_subject,\n>  \t\t    \"to=s\" => \\@initial_to,\n>  \t\t    \"to-cmd=s\" => \\$to_cmd,\n> @@ -676,7 +676,7 @@ if ($compose) {\n>  \n>  \tmy $tpl_sender = $sender || $repoauthor || $repocommitter || '';\n>  \tmy $tpl_subject = $initial_subject || '';\n> -\tmy $tpl_reply_to = $initial_reply_to || '';\n> +\tmy $tpl_in_reply_to = $initial_in_reply_to || '';\n>  \n>  \tprint $c <<EOT1, Git::prefix_lines(\"GIT: \", __ <<EOT2), <<EOT3;\n>  From $tpl_sender # This line is ignored.\n> @@ -689,7 +689,7 @@ Clear the body content if you don't wish to send a summary.\n>  EOT2\n>  From: $tpl_sender\n>  Subject: $tpl_subject\n> -In-Reply-To: $tpl_reply_to\n> +In-Reply-To: $tpl_in_reply_to\n>  \n>  EOT3\n>  \tfor my $f (@files) {\n> @@ -736,7 +736,7 @@ EOT3\n>  \t\t\t\tquote_subject($subject, $compose_encoding) .\n>  \t\t\t\t\"\\n\";\n>  \t\t} elsif (/^In-Reply-To:\\s*(.+)\\s*$/i) {\n> -\t\t\t$initial_reply_to = $1;\n> +\t\t\t$initial_in_reply_to = $1;\n>  \t\t\tnext;\n>  \t\t} elsif (/^From:\\s*(.+)\\s*$/i) {\n>  \t\t\t$sender = $1;\n> @@ -872,16 +872,16 @@ sub expand_one_alias {\n>  @initial_cc = process_address_list(@initial_cc);\n>  @bcclist = process_address_list(@bcclist);\n>  \n> -if ($thread && !defined $initial_reply_to && $prompting) {\n> -\t$initial_reply_to = ask(\n> +if ($thread && !defined $initial_in_reply_to && $prompting) {\n> +\t$initial_in_reply_to = ask(\n>  \t\t__(\"Message-ID to be used as In-Reply-To for the first email (if any)? \"),\n>  \t\tdefault => \"\",\n>  \t\tvalid_re => qr/\\@.*\\./, confirm_only => 1);\n>  }\n> -if (defined $initial_reply_to) {\n> -\t$initial_reply_to =~ s/^\\s*<?//;\n> -\t$initial_reply_to =~ s/>?\\s*$//;\n> -\t$initial_reply_to = \"<$initial_reply_to>\" if $initial_reply_to ne '';\n> +if (defined $initial_in_reply_to) {\n> +\t$initial_in_reply_to =~ s/^\\s*<?//;\n> +\t$initial_in_reply_to =~ s/>?\\s*$//;\n> +\t$initial_in_reply_to = \"<$initial_in_reply_to>\" if $initial_in_reply_to ne '';\n>  }\n>  \n>  if (!defined $smtp_server) {\n> @@ -901,7 +901,7 @@ if ($compose && $compose > 0) {\n>  }\n>  \n>  # Variables we set as part of the loop over files\n> -our ($message_id, %mail, $subject, $reply_to, $references, $message,\n> +our ($message_id, %mail, $subject, $in_reply_to, $references, $message,\n>  \t$needs_confirm, $message_num, $ask_default);\n>  \n>  sub extract_valid_address {\n> @@ -1310,9 +1310,9 @@ Message-Id: $message_id\n>  \tif ($use_xmailer) {\n>  \t\t$header .= \"X-Mailer: git-send-email $gitversion\\n\";\n>  \t}\n> -\tif ($reply_to) {\n> +\tif ($in_reply_to) {\n>  \n> -\t\t$header .= \"In-Reply-To: $reply_to\\n\";\n> +\t\t$header .= \"In-Reply-To: $in_reply_to\\n\";\n>  \t\t$header .= \"References: $references\\n\";\n>  \t}\n>  \tif (@xh) {\n> @@ -1489,8 +1489,8 @@ EOF\n>  \treturn 1;\n>  }\n>  \n> -$reply_to = $initial_reply_to;\n> -$references = $initial_reply_to || '';\n> +$in_reply_to = $initial_in_reply_to;\n> +$references = $initial_in_reply_to || '';\n>  $subject = $initial_subject;\n>  $message_num = 0;\n>  \n> @@ -1700,9 +1700,9 @@ foreach my $t (@files) {\n>  \n>  \t# set up for the next message\n>  \tif ($thread && $message_was_sent &&\n> -\t\t($chain_reply_to || !defined $reply_to || length($reply_to) == 0 ||\n> +\t\t($chain_reply_to || !defined $in_reply_to || length($in_reply_to) == 0 ||\n>  \t\t$message_num == 1)) {\n> -\t\t$reply_to = $message_id;\n> +\t\t$in_reply_to = $message_id;\n>  \t\tif (length $references > 0) {\n>  \t\t\t$references .= \"\\n $message_id\";\n>  \t\t} else {\n"},{"id":"336722","messageId":"xmqqzi5cqjur.fsf@gitster.mtv.corp.google.com","threadId":"47625","inReplyTo":"20180117180801.31049-2-chrissicool@gmail.com","subject":"Re: [PATCH v2 2/2] send-email: Support separate Reply-To address","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-01-17T21:02:52Z","receivedAt":"2018-01-17T21:02:59Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Christian Ludwig <chrissicool@googlemail.com> writes:\n\n> In some projects contributions from groups are only accepted from a\n> common group email address. But every individual may want to recieve\n> replies to her own personal address. That's what we have 'Reply-To'\n> headers for in SMTP.\n>\n> Introduce an optional '--reply-to' command line option. Unfortunately\n> the $reply_to variable name was already taken for the 'In-Reply-To'\n> header field. To reduce code churn, use $reply_address as variable\n> name instead.\n>\n> Signed-off-by: Christian Ludwig <chrissicool@gmail.com>\n> ---\n>  Documentation/git-send-email.txt       |  5 +++++\n>  contrib/completion/git-completion.bash |  2 +-\n>  git-send-email.perl                    | 18 +++++++++++++++++-\n>  t/t9001-send-email.sh                  |  2 ++\n>  4 files changed, 25 insertions(+), 2 deletions(-)\n\nThanks.\n\nWhile merging this with other topics in flight on 'pu', there were\nminor merge conflicts, especially with np/send-email-header-parsing\nthat ends at b6049542 (\"send-email: extract email-parsing code into\na subroutine\", 2017-12-15) that attempts to refactor the code that\nreads the header lines.  As there is *no* real change that benefits\nby the refactoring accompanying the topic, it was a bit hard for me\nto say if it is needless code churn or if it is a good refactoring.\n\nI wonder if this change can be a good demonstration to measure the\ngoodness of it.  IOW, how would these two patches look if rebased on\nthe result of merging b6049542 to today's 'master'?  Would it make\nthese two patches cleaner and easier to grok?\n\n\n"},{"id":"336730","messageId":"87fu74i1hn.fsf@evledraar.gmail.com","threadId":"47625","inReplyTo":"20180117180801.31049-2-chrissicool@gmail.com","subject":"Re: [PATCH v2 2/2] send-email: Support separate Reply-To address","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2018-01-17T22:06:44Z","receivedAt":"2018-01-17T22:06:51Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Wed, Jan 17 2018, Christian Ludwig jotted:\n\n> +if (defined $reply_to) {\n> +\t$reply_to =~ s/^\\s+|\\s+$//g;\n> +\t($reply_to) = expand_aliases($reply_to);\n> +\t$reply_to = sanitize_address($reply_to);\n> +}\n\nJust a note to other reviewers: I found it odd to call a function with\none argument and then enforce list context, but I see expand_aliases()\nexpects to be called that way, and this is copied from a previous\npattern earlier in the file.\n\n(As an aside, that code looks a bit odd, but then I see 302e04ea4d\n(\"send-email: detect cycles in alias expansion\", 2009-07-23) )\n\nLooks good to me.\n"},{"id":"336767","messageId":"CAN0heSqxmLoh33i65JPhyQbmPaAcJcwrTCO+ZD4eb+qh8Pf8+w@mail.gmail.com","threadId":"47625","inReplyTo":"20180117180801.31049-2-chrissicool@gmail.com","subject":"Re: [PATCH v2 2/2] send-email: Support separate Reply-To address","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2018-01-18T11:00:04Z","receivedAt":"2018-01-18T11:00:15Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"On 17 January 2018 at 19:08, Christian Ludwig\n<chrissicool@googlemail.com> wrote:\n> In some projects contributions from groups are only accepted from a\n> common group email address. But every individual may want to recieve\n> replies to her own personal address. That's what we have 'Reply-To'\n> headers for in SMTP.\n\ns/recieve/receive/\n\n> Introduce an optional '--reply-to' command line option. Unfortunately\n> the $reply_to variable name was already taken for the 'In-Reply-To'\n> header field. To reduce code churn, use $reply_address as variable\n> name instead.\n\n\"To reduce ...\" no longer describes the patch, since v2 actually\nperforms that refactoring in patch 1/2.  \"Unfortunately ...\" is\ncorrect, but seems less relevant now. Except:\n\nI suppose that a non-git.git patch which uses $reply_to could start\nmisbehaving now that this series changes the meaning of that variable.\nJust thinking out loud, it could make some sense to take patch 1/2 for\nsanity, but to then *not* re-use $reply_to for a new purpose, but to\nactually take your v1-patch as 2/2. Or, this potential problem can\nperhaps be ignored (except in the commit message?)..\n\n> Signed-off-by: Christian Ludwig <chrissicool@gmail.com>\n\n\"From:\" and \"Signed-off-by:\" are different. Not sure if that's ok.\n\nMartin\n"}]}