@matheusbsbs / matheus-bagliano / commits / 40e6e8a0c4
Fork 0

send-email: Handle "GIT:" rather than "GIT: " during --compose

This should make things a little more robust in terms of user input; before, even the program got it wrong by outputting a line with only "GIT:", which was left in place as a header, because there would be no following space character. Signed-off-by: Michael Witten <mfwitten@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Michael Witten committed Apr 13, 2009 at 13:23 UTC 40e6e8a0c485e618be366f13247fd745ac00b911
1 file changed +2 -2
git-send-email.perl
+2 -2
@@ -529,7 +529,7 @@ if ($compose) {
529
530 print C <<EOT;
531 From $tpl_sender # This line is ignored.
532 -GIT: Lines beginning in "GIT: " will be removed.
532 +GIT: Lines beginning in "GIT:" will be removed.
533 GIT: Consider including an overall diffstat or table of contents
534 GIT: for the patch you are writing.
535 GIT:
@@ -562,7 +562,7 @@ EOT
562 my $in_body = 0;
563 my $summary_empty = 1;
564 while(<C>) {
565 - next if m/^GIT: /;
565 + next if m/^GIT:/;
566 if ($in_body) {
567 $summary_empty = 0 unless (/^\n$/);
568 } elsif (/^\n$/) {