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 3cd6e8e6cc5965fdd42c25cd773fcd84e2348ee1..1ad499d717ce1bf18435a9d47489802575665871 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.
     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.
 
   Infrastructure:
   * Better error handling in dgit-repos-policy-debian.
diff --git a/dgit b/dgit
index 1a5b88a5ef16284a0b09dc3affbb5e2fe0d119dc..836e19d4257173a9fe046781500e3cef0c2f0855 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: $!";
     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 $!;
     print O <<END or die $!;
-Description: $msg
-Author: $author
-$xinfo
+From: $author
+${xinfo}Subject: $msg
 ---
 
 END
 ---
 
 END
index e11e1ad6bf9d2eda869460d8d9b013186853f277..37cb8d188e10556d173e818a1bd96bfe15e823a2 100755 (executable)
@@ -46,7 +46,7 @@ zorkmid-options-=-42
 END
 
 for f in `cat debian/patches/series`; do
 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 |
 done
 
 t-822-field ../${p}_${v}_*.changes Changes |