Sean Whitton writes ("Bug#910705: Bug#910687: dgit: build-source and push-source disregard -wc"): > I'm pretty sure this is a straightforward bug -- unless --ignore-dirty > or --include-dirty is specified, push-source and build-source are meant > to error out if the tree is dirty.
There are three levels of dirtiness: contains uncommitted changes to tracked files; contains untracked but ignored files; contains untracked and un-ignored files. Currently dgit only *complains* about uncommitted changes to tracked files. Untracked files of both kinds are deleted by -wg[f] - except that if dgit uses a playtree it doesn't need to clean at all so it doesn't and the files are not included but also not deleted. That -wc does not spot untracked files is clearly a bug. But it would be sensible to have a variant that tolerates ignored untracked files. What -wd[d] ought to do about untracked files - especially un-ignored ones - is far from clear. It runs rules clean and then hopefully the build products are deleted, but clean targets are often buggy. gitignore files are often missing or incomplete. Hence my suggestion for -wd[d] by default to trip on untracked unignored files, but to ignore untracked ignored ones. An ignored file has been deliberately marked to be excluded from the source code. And there should be an option to allow un-ignored ones too. The underlying thing going on here is that when making a source package the user might reasonably want to simply not include the junk that is cluttering their tree, rather than having dgit insist on it being either deleted or included in the output. Ian.