* [PATCH] git-format-patch: Always add a blank line between headers and body.
@ 2006-02-27 13:09 Alexandre Julliard
0 siblings, 0 replies; only message in thread
From: Alexandre Julliard @ 2006-02-27 13:09 UTC (permalink / raw)
To: git
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>
---
git-format-patch.sh | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
dcd0ed6ced98990c92a32416c0acc3ec298f5b91
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) {
--
1.2.3.gb348-dirty
--
Alexandre Julliard
julliard@winehq.org
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2006-02-27 13:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-27 13:09 [PATCH] git-format-patch: Always add a blank line between headers and body Alexandre Julliard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).