From 70a10f7722f0bd52c782416df01bbacf42435843 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 16 Nov 2014 20:21:42 +0000 Subject: quiltify_dpkg_commit: Improve * Coalesce $msg and $title * New optional $xinfo argument * Squah trailing whitespace (eg blank lines) --- dgit | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/dgit b/dgit index fcaf386..af95766 100755 --- a/dgit +++ b/dgit @@ -2039,19 +2039,20 @@ our $dscfn; our $fakeeditorenv = 'DGIT_FAKE_EDITOR_QUILT'; -sub quiltify_dpkg_commit ($$$$) { - my ($patchname,$title,$author,$msg) = @_; +sub quiltify_dpkg_commit ($$$;$) { + my ($patchname,$author,$msg, $xinfo) = @_; + $xinfo //= ''; mkpath '.git/dgit'; my $descfn = ".git/dgit/quilt-description.tmp"; open O, '>', $descfn or die "$descfn: $!"; + $msg =~ s/\s+$//g; $msg =~ s/\n/\n /g; $msg =~ s/^\s+$/ ./mg; print O <{Version})", + "Automatically generated patch ($clogp->{Version})\n". "Last (up to) $ncommits git changes, FYI:\n\n". $msg; } -- cgit v1.2.3