chiark / gitweb /
When running git-add in commit-quilty-patch, properly escape filenames (which git...
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 18 Aug 2015 14:30:07 +0000 (15:30 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 18 Aug 2015 14:30:07 +0000 (15:30 +0100)
debian/changelog
dgit

index 886ab3b..9177e0e 100644 (file)
@@ -2,6 +2,8 @@ dgit (1.4~~) UNRELEASED; urgency=low
 
   * Unbreak --dry-run (`exiting subroutine via next', broken in
     ac221d67, bug released in 0.22).
+  * When running git-add in commit-quilty-patch, properly escape
+    filenames (which git-add treats as glob patterns).
 
  --
 
diff --git a/dgit b/dgit
index 8f0052b..baf3096 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -1783,7 +1783,8 @@ sub commit_quilty_patch () {
        progress "nothing quilty to commit, ok.";
        return;
     }
-    runcmd_ordryrun_local @git, qw(add), sort keys %adds;
+    my @adds = map { s/[][*?\\]/\\$&/g; $_; } sort keys %adds;
+    runcmd_ordryrun_local @git, qw(add), @adds;
     commit_admin "Commit Debian 3.0 (quilt) metadata";
 }