chiark / gitweb /
Quilt output: Produce output like git-format-patch
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 9 Oct 2016 00:06:32 +0000 (01:06 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 10 Oct 2016 00:01:10 +0000 (01:01 +0100)
Do not .-convert the message and stuff it in Description.

Instead, generate a normal-looking patch with From and Subject.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/changelog
dgit
tests/tests/quilt

index 3cd6e8e..1ad499d 100644 (file)
@@ -28,6 +28,9 @@ dgit (1.5~~) unstable; urgency=medium
     for filename creation (makes filename deterministic in test suite).
   * New --overwrite option, replaces need to for user to use
     git merge -s ours.  Closes:#838718.
+  * When generating quilt patches from git commits, make patches that
+    look quite like git-format-patch output (rather than strange things
+    based on an obselete interpretation of DEP-3).
 
   Infrastructure:
   * Better error handling in dgit-repos-policy-debian.
diff --git a/dgit b/dgit
index 1a5b88a..836e19d 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -3637,13 +3637,10 @@ sub quiltify_dpkg_commit ($$$;$) {
     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;
+    $msg =~ s/\n+/\n\n/;
     print O <<END or die $!;
-Description: $msg
-Author: $author
-$xinfo
+From: $author
+${xinfo}Subject: $msg
 ---
 
 END
index e11e1ad..37cb8d1 100755 (executable)
@@ -46,7 +46,7 @@ zorkmid-options-=-42
 END
 
 for f in `cat debian/patches/series`; do
-       egrep -q '^Author.*ijackson@chiark' debian/patches/$f
+       egrep -q '^From.*ijackson@chiark' debian/patches/$f
 done
 
 t-822-field ../${p}_${v}_*.changes Changes |