chiark / gitweb /
Quilt output: Normalise trailing newlines in commit message
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 9 Oct 2016 00:08:26 +0000 (01:08 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 10 Oct 2016 00:01:10 +0000 (01:01 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit

diff --git a/dgit b/dgit
index 2acf849..4b593fc 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -3978,6 +3978,9 @@ sub quiltify ($$$$) {
 
        $msg =~ s/^(.*)\n*/$1\n/ or die "$cc $msg ?";
 
+       my $strip_nls = sub { $msg =~ s/\n+$//; $msg .= "\n"; };
+       $strip_nls->();
+
        my $title = $1;
        my $patchname = $title;
        $patchname =~ s/[.:]$//;