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>
This commit is contained in:
committed by
Junio C Hamano
parent
dd602bf8ec
commit
40e6e8a0c4
@ -529,7 +529,7 @@ if ($compose) {
|
|||||||
|
|
||||||
print C <<EOT;
|
print C <<EOT;
|
||||||
From $tpl_sender # This line is ignored.
|
From $tpl_sender # This line is ignored.
|
||||||
GIT: Lines beginning in "GIT: " will be removed.
|
GIT: Lines beginning in "GIT:" will be removed.
|
||||||
GIT: Consider including an overall diffstat or table of contents
|
GIT: Consider including an overall diffstat or table of contents
|
||||||
GIT: for the patch you are writing.
|
GIT: for the patch you are writing.
|
||||||
GIT:
|
GIT:
|
||||||
@ -562,7 +562,7 @@ EOT
|
|||||||
my $in_body = 0;
|
my $in_body = 0;
|
||||||
my $summary_empty = 1;
|
my $summary_empty = 1;
|
||||||
while(<C>) {
|
while(<C>) {
|
||||||
next if m/^GIT: /;
|
next if m/^GIT:/;
|
||||||
if ($in_body) {
|
if ($in_body) {
|
||||||
$summary_empty = 0 unless (/^\n$/);
|
$summary_empty = 0 unless (/^\n$/);
|
||||||
} elsif (/^\n$/) {
|
} elsif (/^\n$/) {
|
||||||
|
|||||||
Reference in New Issue
Block a user