chiark / gitweb /
dgit: In quilt_fixup_multipatch, work around git checkout paths
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 10 Feb 2018 14:14:03 +0000 (14:14 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 16 Jun 2018 11:25:49 +0000 (12:25 +0100)
git checkout paths does not delete files.
This is a hypothetical bug AFAIAA.

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

index 91dd7c494c8913322ba647f3da12698428d7a279..a3404138c9006b453f70717556607b5a466e2237 100644 (file)
@@ -2,6 +2,8 @@ dgit (4.5~) unstable; urgency=medium
 
   Bugfixes:
   * When checking that the tree is clean, check the git index too.
+  * In quilt_fixup_multipatch, work around git checkout paths
+    not deleting files.  (Hypothetical bug AFAIAA.)
 
   Minor fixes:
   * "confess" when we die due to a warning, rather than symply dieing.
diff --git a/dgit b/dgit
index 17e4fadb360affeaa85a2988692750c90180c778..49350ee70782bd08eb10d4a005d315c3f4e58252 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -5701,6 +5701,7 @@ sub quilt_fixup_multipatch ($$$) {
 
     rmtree '.pc';
 
+    rmtree 'debian'; # git checkout commitish paths does not delete!
     runcmd @git, qw(checkout -f), $headref, qw(-- debian);
     my $unapplied=git_add_write_tree();
     printdebug "fake orig tree object $unapplied\n";