X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=git-format-patch.sh;h=2bd26395ecc687e01c7915b5ba13e9576749143b;hb=872d001f7f576b2d32f6278dc265d6449787b714;hp=e54c9e4a9407da56ff7e9da81f6105c864ba1d5d;hpb=66f04f38f42024dceb1679fc4d672de3746cf237;p=git.git diff --git a/git-format-patch.sh b/git-format-patch.sh index e54c9e4a..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) { @@ -189,7 +189,7 @@ my @month_names = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec); sub show_date { my ($time, $tz) = @_; my $minutes = abs($tz); - $minutes = ($minutes / 100) * 60 + ($minutes % 100); + $minutes = int($minutes / 100) * 60 + ($minutes % 100); if ($tz < 0) { $minutes = -$minutes; } @@ -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) {