From: Ian Jackson Date: Sun, 16 Nov 2014 20:21:42 +0000 (+0000) Subject: quiltify_dpkg_commit: Improve X-Git-Tag: debian/0.30~286 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=70a10f7722f0bd52c782416df01bbacf42435843;hp=4423ff8ec350aa17c19f63dd6d7f3efa42ddd856 quiltify_dpkg_commit: Improve * Coalesce $msg and $title * New optional $xinfo argument * Squah trailing whitespace (eg blank lines) --- diff --git a/dgit b/dgit index fcaf386f..af957667 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; }