summaryrefslogtreecommitdiff
path: root/git-format-patch.sh
diff options
context:
space:
mode:
authorAlexandre Julliard <julliard@winehq.org>2006-02-27 13:09:56 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-02-27 19:01:47 (GMT)
commitf891cb3fd6b3c2871c1a15e122366e412428204c (patch)
tree54a00c0da045d04ef7ac1a63446965d6e556296e /git-format-patch.sh
parent6baf0484efcd29bb5e58ccd5ea0379481d4a83f4 (diff)
downloadgit-f891cb3fd6b3c2871c1a15e122366e412428204c.zip
git-f891cb3fd6b3c2871c1a15e122366e412428204c.tar.gz
git-f891cb3fd6b3c2871c1a15e122366e412428204c.tar.bz2
git-format-patch: Always add a blank line between headers and body.
If the second line of the commit message isn't empty, git-format-patch needs to add an empty line in order to generate a properly formatted mail. Otherwise git-rebase drops the rest of the commit message. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-format-patch.sh')
-rwxr-xr-xgit-format-patch.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/git-format-patch.sh b/git-format-patch.sh
index eb75de4..2bd2639 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 (<FH>) {
$done_subject = 1;
next;
}
+ unless ($done_separator) {
+ print "\n";
+ $done_separator = 1;
+ next if (/^$/);
+ }
$last_was_signoff = 0;
if (/Signed-off-by:/i) {