summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog1
-rwxr-xr-xdgit4
-rw-r--r--dgit.110
3 files changed, 15 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index a30e469..0f1cff7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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.
+ * New --ignore-dirty option to skip noncritical check. Closes: #720895.
--
diff --git a/dgit b/dgit
index 71b0423..02acfa7 100755
--- a/dgit
+++ b/dgit
@@ -36,6 +36,7 @@ our $sign = 1;
our $dryrun = 0;
our $changesfile;
our $new_package = 0;
+our $ignoredirty = 0;
our $existing_package = 'dpkg';
our $cleanmode = 'dpkg-source';
@@ -763,6 +764,7 @@ sub pull () {
}
sub check_not_dirty () {
+ return if $ignoredirty;
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'";
+ } elsif (m/^--ignore-dirty$/s) {
+ $ignoredirty = 1;
} else {
badusage "unknown long option \`$_'";
}
diff --git a/dgit.1 b/dgit.1
index 9740856..af18b0f 100644
--- 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
+.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).