chiark / gitweb /
dgit: clean: Change matcbing of git to regexps
[dgit.git] / dgit.1
diff --git a/dgit.1 b/dgit.1
index 19a88fae79ff6b633f4fb83ac0f4051b39df8059..60bf0d3767fc157ae80fa7990a047f9bb76a3d38 100644 (file)
--- a/dgit.1
+++ b/dgit.1
@@ -538,6 +538,11 @@ This will delete all files which are not tracked by git.
 options other than dpkg-source
 are useful when the package's clean target is troublesome, or
 to avoid needing the build-dependencies.
+
+dgit will only actually clean the tree if it needs to
+(because it needs to build the source package
+or binaries from your working tree).
+Otherwise any untracked files will be simply ignored.
 .TP
 .BR --clean=git-ff " | " -wgf
 Use
@@ -573,21 +578,50 @@ If there are
 files which are not in git, or if the build creates such files, a
 subsequent dgit push will fail.
 .TP
-.BR --clean=dpkg-source " | " -wd
+.BR --clean=dpkg-source "[" -d "] | " -wd " | " -wdd
 Use dpkg-buildpackage to do the clean, so that the source package
 is cleaned by dpkg-source running the package's clean target.
-This is the default.
-Requires the package's build dependencies.
-.TP
-.BR --clean=dpkg-source-d " | " -wdd
-Use
-.B dpkg-buildpackage -d
-to do the clean,
-so that the source package
-is cleaned by dpkg-source running the package's clean target.
-The build-dependencies are not checked (due to
-.BR -d ),
+--clean=dpkg-source is the default.
+
+Without the extra
+.BR d ,
+requires the package's build dependencies.
+
+With
+.BR ... -d
+or
+.BR -wdd ,
+the build-dependencies are not checked
+(due to passing
+.BR -d
+to dpkg-buildpackage),
 which violates policy, but may work in practice.
+
+The rules clean target will only be run if it is needed:
+when dgit is going to build source or binary packages
+from your working tree,
+rather than from your git branch
+(for example because of --include-dirty
+or because the binary package build uses your working tree).
+
+In all cases,
+dgit will check that there are (after rules clean, if applicable) no
+untracked un-ignored files,
+in case these are files you forgot to git add.
+(Except that this check is not done
+for a `3.0 (quilt)' package
+when dgit has to apply patches, dirtily, to the working tree.)
+If your package does not have a good .gitignore
+you will probably need --clean=dpkg-source,no-check aka -wdn.
+.TP
+.BR --clean=dpkg-source "[" -d "]" ,no-check " | " -wdn " | " -wddn
+Like --clean=dpkg-source, but
+does not care about untracked un-ignored files.
+.TP
+.BR --clean=dpkg-source "[" -d "]" ,all-check " | " -wda " | " -wdda
+Like --clean=dpkg-source, but
+fails even on ignored untracked files.
+This could perhaps be used to detect bugs in your rules clean target.
 .TP
 .BR -N " | " --new
 The package is or may be new in this suite.  Without this, dgit will
@@ -1045,6 +1079,24 @@ and the
 .B keyid
 distro config setting.
 .TP
+.RI \fB--curl!:\fR option " | \fB--dput!:\fR" option " |..."
+Specifies an option to remove from the command line for
+a program called by dgit, as for
+\fB--\fR\fIprogram\fI\fB:\fR\fIoption\fR
+(and the same caveats apply).
+
+Any options or arguments exactly identical to
+.I option
+are removed.
+(It is not an error if there were none.)
+
+This can only be used to delete options
+which are always passed by default by dgit,
+or to undo a previous
+\fB--\fR\fIprogram\fI\fB:\fR\fIoption\fR.
+It cannot be used to override option(s) dynamically
+decided on by dgit.
+.TP
 .RI \fB--curl=\fR program " | \fB--dput=\fR" program  " |..."
 Specifies alternative programs to use instead of
 .BR curl ,
@@ -1236,7 +1288,7 @@ but ignored if the value does not make sense to this version of dgit.
 Setting both .clean-mode and .clean-mode-newer is useful
 to provide a single git config compatible with different dgit versions.
 .TP
-.BR dgit-distro. \fIdistro\fR .quilt-
+.BR dgit-distro. \fIdistro\fR .quilt-mode
 One of the values for the command line --quilt= option; used if
 --quilt is not specified.
 .TP