On Fri, Oct 31, 2008 at 06:01:49PM -0400, Ian Hilt wrote: > I've thought something like this would be a good thing. An editor makes > things easier to fix than the command-line. Speaking of which, maybe let's add the To field to the list. --->8--- From: Ian Hilt <ian.hilt@xxxxxxx> Date: Fri, 31 Oct 2008 22:15:46 -0400 Subject: [PATCH] git-send-email.perl: add To field in editor This allows the compose mode to add the To field in the editor. However it currently will not remove an address. Signed-off-by: Ian Hilt <ian.hilt@xxxxxxx> --- This is on top of the previous patch I sent. git-send-email.perl | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl index 0944be7..ed95402 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -450,6 +450,12 @@ if ($compose) { my $tpl_sender = $sender || $repoauthor || $repocommitter || ''; + my @tpl_to; + if (@to) { + foreach my $i (0..$#to) { + $tpl_to[$i] = $to[$i]; + } + } my $tpl_subject = $initial_subject || ''; my $tpl_reply_to = $initial_reply_to || ''; @@ -459,6 +465,7 @@ From $tpl_sender # This line is ignored. # Consider including an overall diffstat or table of contents # for the patch you are writing. From: $tpl_sender +To: @tpl_to Subject: $tpl_subject In-Reply-To: $tpl_reply_to @@ -514,6 +521,9 @@ EOT } elsif (/^From:\s*(.+)\s*$/i) { $sender = $1; next; + } elsif (/^To:\s*(.+)\s*$/i) { + push @to, $1; + next; } $summary_empty = 0; print C2 $_; @@ -522,7 +532,7 @@ EOT close(C2); if ($summary_empty) { - print "Summary email is empty, skpping it\n"; + print "Summary email is empty, skipping it\n"; $compose = -1; } } elsif ($annotate) { -- 1.6.0.3.523.g304d0 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html