chiark / gitweb /
New --ignore-dirty option to skip noncritical check. Closes: #720895.
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 26 Aug 2013 15:44:47 +0000 (16:44 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 26 Aug 2013 15:44:47 +0000 (16:44 +0100)
debian/changelog
dgit
dgit.1

index a30e469060cef72a6411705503b0df4b95dab51f..0f1cff75a1770a2ab6b72d351e6bd21a5954cdff 100644 (file)
@@ -3,6 +3,7 @@ dgit (0.12) unstable; urgency=low
   * Cope with packages with epoch.  Closes: #720897.
   * Add Closes line for #720595 to changelog entry for 0.11.
   * Improve error message for non-fast-forward push.  Closes: #720896.
   * Cope with packages with epoch.  Closes: #720897.
   * Add Closes line for #720595 to changelog entry for 0.11.
   * Improve error message for non-fast-forward push.  Closes: #720896.
+  * New --ignore-dirty option to skip noncritical check.  Closes: #720895.
 
  --
 
 
  --
 
diff --git a/dgit b/dgit
index 71b042302dfa1e88eed02571bc47381e748f12a1..02acfa7fac5be920236d18cc4fdd51f101be3901 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -36,6 +36,7 @@ our $sign = 1;
 our $dryrun = 0;
 our $changesfile;
 our $new_package = 0;
 our $dryrun = 0;
 our $changesfile;
 our $new_package = 0;
+our $ignoredirty = 0;
 our $existing_package = 'dpkg';
 our $cleanmode = 'dpkg-source';
 
 our $existing_package = 'dpkg';
 our $cleanmode = 'dpkg-source';
 
@@ -763,6 +764,7 @@ sub pull () {
 }
 
 sub check_not_dirty () {
 }
 
 sub check_not_dirty () {
+    return if $ignoredirty;
     my @cmd = (@git, qw(diff --quiet HEAD));
     printcmd(\*DEBUG,"+",@cmd) if $debug>0;
     $!=0; $?=0; system @cmd;
     my @cmd = (@git, qw(diff --quiet HEAD));
     printcmd(\*DEBUG,"+",@cmd) if $debug>0;
     $!=0; $?=0; system @cmd;
@@ -1193,6 +1195,8 @@ sub parseopts () {
                $cleanmode = $1;
            } elsif (m/^--clean=(.*)$/s) {
                badusage "unknown cleaning mode \`$1'";
                $cleanmode = $1;
            } elsif (m/^--clean=(.*)$/s) {
                badusage "unknown cleaning mode \`$1'";
+           } elsif (m/^--ignore-dirty$/s) {
+               $ignoredirty = 1;
            } else {
                badusage "unknown long option \`$_'";
            }
            } else {
                badusage "unknown long option \`$_'";
            }
diff --git a/dgit.1 b/dgit.1
index 9740856b215a59d62c8790743b3cb2faa2d2b023..af18b0fb71e0e337736e8effb013902e1d97de35 100644 (file)
--- a/dgit.1
+++ b/dgit.1
@@ -342,6 +342,16 @@ This is the default.  It requires the package's build dependencies.
 The package may be new in this suite.  Without this, dgit will
 refuse to push.
 .TP
 The package may be new in this suite.  Without this, dgit will
 refuse to push.
 .TP
+.BR --ignore-dirty
+Do not complain if the working tree does not match your git HEAD.
+This can be useful with build, if you plan to commit later.  (dgit
+push will still ensure that the .dsc you upload and the git tree
+you push are identical, so this option won't make broken pushes.)
+
+This option may not work properly on `3.0 (quilt)' packages, as in
+that case dgit needs to use and perhaps commit parts of your working
+tree.
+.TP
 .BI -D
 Prints debugging information to stderr.  Repeating the option produces
 more output (currently, up to -DD is meaningfully different).
 .BI -D
 Prints debugging information to stderr.  Repeating the option produces
 more output (currently, up to -DD is meaningfully different).