summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog2
-rwxr-xr-xdgit7
-rw-r--r--dgit.19
3 files changed, 17 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 63fb0de..d3cf4bc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -36,6 +36,8 @@ dgit (0.30) unstable; urgency=high
dpkg-buildpackage, suppressing calls to the package's clean target.
Also, expand the documentation in this area slightly. Closes:#768590.
+ * Provide --clean=git-ff (aka -wgf), which is useful for dgit itself (!)
+
Minor improvements:
* Reduce some noise output and improve the clarity of some messages.
diff --git a/dgit b/dgit
index 066f2a6..079e5de 100755
--- a/dgit
+++ b/dgit
@@ -2635,6 +2635,8 @@ sub clean_tree () {
runcmd_ordryrun_local @dpkgbuildpackage, qw(-T clean);
} elsif ($cleanmode eq 'git') {
runcmd_ordryrun_local @git, qw(clean -xdf);
+ } elsif ($cleanmode eq 'git-ff') {
+ runcmd_ordryrun_local @git, qw(clean -xdff);
} elsif ($cleanmode eq 'none') {
} else {
die "$cleanmode ?";
@@ -2871,7 +2873,7 @@ sub parseopts () {
} elsif (m/^--build-products-dir=(.*)/s) {
push @ropts, $_;
$buildproductsdir = $1;
- } elsif (m/^--clean=(dpkg-source|git|none)$/s) {
+ } elsif (m/^--clean=(dpkg-source|git|git-ff|none)$/s) {
push @ropts, $_;
$cleanmode = $1;
} elsif (m/^--clean=(.*)$/s) {
@@ -2943,6 +2945,9 @@ sub parseopts () {
} elsif (s/^-wg$//s) {
push @ropts, $&;
$cleanmode = 'git';
+ } elsif (s/^-wgf$//s) {
+ push @ropts, $&;
+ $cleanmode = 'git-ff';
} elsif (s/^-wd$//s) {
push @ropts, $&;
$cleanmode = 'dpkg-source';
diff --git a/dgit.1 b/dgit.1
index 0f3f9c7..1c87e9a 100644
--- a/dgit.1
+++ b/dgit.1
@@ -269,6 +269,15 @@ from being run.
the downside is simply that git clean may delete files you forgot to
git add.
.TP
+.BR --clean=git-ff " | " -wgf
+The source tree should be cleaned, before building a source package
+with one of the build options, using
+.BR "git clean -xdff" .
+This is like
+"git clean -xdf"
+but it also removes any subdirectories containing different git
+trees (which only unusual packages are likely to create).
+.TP
.BR --clean=none " | " -wn
Do not clean the tree before building a source package. If there are
files which are not in git, or if the build creates such files, a