{"thread":{"id":"3475","subject":"[PATCH] git-format-patch: Always add a blank line between headers and body.","startedAt":"2006-02-27T13:09:56Z","lastAt":"2006-02-27T13:09:56Z","messageCount":1,"participants":["Alexandre Julliard"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"16813","messageId":"874q2lhrrv.fsf@wine.dyndns.org","threadId":"3475","inReplyTo":null,"subject":"[PATCH] git-format-patch: Always add a blank line between headers and body.","fromName":"Alexandre Julliard","fromEmail":"julliard@winehq.org","sentAt":"2006-02-27T13:09:56Z","receivedAt":"2006-02-27T13:09:56Z","isPatch":true,"sender":{"key":"julliard@winehq.org","avatar":null},"body":"If the second line of the commit message isn't empty, git-format-patch\nneeds to add an empty line in order to generate a properly formatted\nmail. Otherwise git-rebase drops the rest of the commit message.\n\nSigned-off-by: Alexandre Julliard <julliard@winehq.org>\n\n---\n\n git-format-patch.sh |    7 ++++++-\n 1 files changed, 6 insertions(+), 1 deletions(-)\n\ndcd0ed6ced98990c92a32416c0acc3ec298f5b91\ndiff --git a/git-format-patch.sh b/git-format-patch.sh\nindex eb75de4..2bd2639 100755\n--- a/git-format-patch.sh\n+++ b/git-format-patch.sh\n@@ -174,7 +174,7 @@ titleScript='\n process_one () {\n \tperl -w -e '\n my ($keep_subject, $num, $signoff, $commsg) = @ARGV;\n-my ($signoff_pattern, $done_header, $done_subject, $signoff_seen,\n+my ($signoff_pattern, $done_header, $done_subject, $done_separator, $signoff_seen,\n     $last_was_signoff);\n \n if ($signoff) {\n@@ -228,6 +228,11 @@ while (<FH>) {\n \t$done_subject = 1;\n \tnext;\n     }\n+    unless ($done_separator) {\n+        print \"\\n\";\n+        $done_separator = 1;\n+        next if (/^$/);\n+    }\n \n     $last_was_signoff = 0;\n     if (/Signed-off-by:/i) {\n-- \n1.2.3.gb348-dirty\n\n\n-- \nAlexandre Julliard\njulliard@winehq.org\n"}]}