chiark / gitweb /
Autogenerated quilt patch fixup patch Description contains several recent git commits...
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 25 Aug 2013 14:59:56 +0000 (15:59 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 25 Aug 2013 14:59:56 +0000 (15:59 +0100)
debian/changelog
dgit

index 66f74cfba2fb0b33f1f5e3ff8921749f6588a55c..fea55959a3ae5786025dec789f39f69049f4b23f 100644 (file)
@@ -2,6 +2,9 @@ dgit (0.11) unstable; urgency=low
 
   * Fix bug which would make quilt patch fixup fail if git status
     produced "M" lines.
+  * Autogenerated quilt patch fixup patch Description contains several
+    recent git commits, rather than implying that the patch corresponds
+    exactly to the top git commit.
   * Use "ftp.debian.org" not "http.debian.net" as the default Debian
     archive.  (http.debian.net tends to defeat certain kinds of cacheing,
     and can also have more skew.)
diff --git a/dgit b/dgit
index 878065fff06eaaf1bc49993be180f39ae79790e8..0adf30224df5d4c34d6e5f3647d6d9beb7534b10 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -992,18 +992,23 @@ sub build_maybe_quilt_fixup () {
     chomp;
     return unless madformat($_);
     # sigh
+    my $clogp = parsechangelog();
+    my $version = getfield $clogp, 'Version';
+    my $author = getfield $clogp, 'Maintainer';
     my $headref = rev_parse('HEAD');
     my $time = time;
+    my $ncommits = 3;
     my $patchname = "auto-$version-$headref-$time";
-    my $author = cmdoutput @git, qw(log -n1), '--pretty=format:%an <%ae>';
-    my $msg = cmdoutput @git, qw(log -n1), "--pretty=format:%s\n%b";
+    my $msg = cmdoutput @git, qw(log), "-n$ncommits";
     my $descfn = ".git/dgit/quilt-description.tmp";
     open O, '>', $descfn or die "$descfn: $!";
     $msg =~ s/\n/\n /g;
     $msg =~ s/^\s+$/ ./mg;
     print O <<END or die $!;
-Description: $msg
- [generated from git commit $headref]
+Description: Automatically generated patch ($clogp->{Version})
+ Last (up to) $ncommits git changes, FYI:
+ .
+ $msg
 Author: $author
 
 ---