@matheusbsbs / matheus-bagliano / commits / f891cb3fd6
Fork 0

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>

Alexandre Julliard committed Feb 27, 2006 at 14:09 UTC f891cb3fd6b3c2871c1a15e122366e412428204c
1 file changed +6 -1
git-format-patch.sh
+6 -1
@@ -174,7 +174,7 @@ titleScript='
174 process_one () {
175 perl -w -e '
176 my ($keep_subject, $num, $signoff, $commsg) = @ARGV;
177 -my ($signoff_pattern, $done_header, $done_subject, $signoff_seen,
177 +my ($signoff_pattern, $done_header, $done_subject, $done_separator, $signoff_seen,
178 $last_was_signoff);
179
180 if ($signoff) {
@@ -228,6 +228,11 @@ while (<FH>) {
228 $done_subject = 1;
229 next;
230 }
231 + unless ($done_separator) {
232 + print "\n";
233 + $done_separator = 1;
234 + next if (/^$/);
235 + }
236
237 $last_was_signoff = 0;
238 if (/Signed-off-by:/i) {