From: Ian Jackson Date: Mon, 26 Aug 2013 15:44:47 +0000 (+0100) Subject: New --ignore-dirty option to skip noncritical check. Closes: #720895. X-Git-Tag: debian/0.12~2 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=7cf634614b9a4ee18a70030e3b340dccd470f908 New --ignore-dirty option to skip noncritical check. Closes: #720895. --- diff --git a/debian/changelog b/debian/changelog index a30e4690..0f1cff75 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 71b04230..02acfa7f 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 9740856b..af18b0fb 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).