chiark / gitweb /
dgit: commit_quilty_patch: Handle other file statuses too
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 20 Jun 2018 22:47:54 +0000 (23:47 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 21 Jun 2018 00:11:11 +0000 (01:11 +0100)
In particular, R can occur if all Debian changes have been removed in
a package with single-debian-patch, in which case we would fail to
commit the patch queue removal.  I don't think dpkg-source will remove
files in other cases, so this is probably the only actually buggy
case.

I don't think the other letters are particularly likely but if they
occur they should be committed too.  I have deliberately excluded U
which should definitely not occur.

Closes:#893263.

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

index 68ec24e7c40b8554f0b6a28e371791b1e73a1840..da734308991faeb1d88c6c594a858616e306170f 100644 (file)
@@ -3,6 +3,8 @@ dgit (5.2~) unstable; urgency=medium
   * dgit(1): Mention under `dgit build' that it uses the network.
 
   dgit:
+  * When all Debian changes vanish with single-debian-patch,
+    do not fail to commit the patch queue removal.  Closes:#877036.
   * When build fails because the network is offline, mention
     that this is because --since-version was not specified.
     Closes:#883340.
diff --git a/dgit b/dgit
index 9084eaf237e7d38f32c1799ee4c58da3b5778b0d..1f065dd3bbc9436804f53a52bfa50fb117553dc0 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -3760,7 +3760,7 @@ sub commit_quilty_patch () {
     my %adds;
     foreach my $l (split /\n/, $output) {
        next unless $l =~ m/\S/;
-       if ($l =~ m{^(?:\?\?| M) (.pc|debian/patches)}) {
+       if ($l =~ m{^(?:\?\?| [MADRC]) (.pc|debian/patches)}) {
            $adds{$1}++;
        }
     }