X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=git-format-patch.sh;h=2bd26395ecc687e01c7915b5ba13e9576749143b;hb=c7569b1e0009e0187ce9f87f23699eaa8576b6ee;hp=eb75de46019284df4e9e2862736d232c230a5596;hpb=ab8c9fe256a21413f86080082cf65b6f7c7656b3;p=git.git diff --git a/git-format-patch.sh b/git-format-patch.sh index eb75de46..2bd26395 100755 --- a/git-format-patch.sh +++ b/git-format-patch.sh @@ -174,7 +174,7 @@ titleScript=' process_one () { perl -w -e ' my ($keep_subject, $num, $signoff, $commsg) = @ARGV; -my ($signoff_pattern, $done_header, $done_subject, $signoff_seen, +my ($signoff_pattern, $done_header, $done_subject, $done_separator, $signoff_seen, $last_was_signoff); if ($signoff) { @@ -228,6 +228,11 @@ while () { $done_subject = 1; next; } + unless ($done_separator) { + print "\n"; + $done_separator = 1; + next if (/^$/); + } $last_was_signoff = 0; if (/Signed-off-by:/i) {