chiark / gitweb /
Fix bug which would make quilt patch fixup fail if git status produced "M" lines.
[dgit.git] / dgit
diff --git a/dgit b/dgit
index 3f9dd97375a6cf00a1a22276fe8ee16f5dd24645..878065fff06eaaf1bc49993be180f39ae79790e8 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -236,7 +236,7 @@ our %defcfg = ('dgit.default.distro' => 'debian',
               'dgit-distro.debian.sshdakls-host' => 'coccia.debian.org',
               'dgit-distro.debian.sshdakls-dir' =>
                   '/srv/ftp-master.debian.org/ftp/dists',
-              'dgit-distro.debian.mirror' => 'http://http.debian.net/debian/');
+              'dgit-distro.debian.mirror' => 'http://ftp.debian.org/debian/');
 
 sub cfg {
     foreach my $c (@_) {
@@ -763,7 +763,7 @@ sub commit_quilty_patch () {
     my $bad=0;
     foreach my $l (split /\n/, $output) {
        next unless $l =~ m/\S/;
-       if ($l =~ m{^\?\? (.pc|debian/patches)}) {
+       if ($l =~ m{^(?:\?\?| M) (.pc|debian/patches)}) {
            $adds{$1}++;
        } else {
            print STDERR "git status: $l\n";
@@ -1017,7 +1017,7 @@ END
        runcmd_ordryrun @dpkgsource, qw(--commit .), $patchname;
     }
 
-    if (!open P, '>', ".pc/applied-patches") {
+    if (!open P, '>>', ".pc/applied-patches") {
        $!==&ENOENT or die $!;
     } else {
        close P;