From: Jonathan Nieder Date: Thu, 19 Jan 2012 10:03:42 GMT Subject: Re: Unexpected "clean -Xd" behavior Message-ID: <20120119100317.GA15386@burratino> In-Reply-To: Nguyen Thai Ngoc Duy wrote: > -X is to remove ignored files _only_ (DIR_SHOW_IGNORED flag). And > "foo" is not ignored according to .gitignore, so it cuts short there > and never gets to "foo/a". -x works. Makes sense. I guess the internal logic is that "git clean -fdX" cleans up files that "git clean -fd" would miss, and this is not such a file ("git clean -fd" removes it). But as Pete mentioned, in this edge case the behavior renders "git clean -fdX" less effective than expected at its primary task as poor man's "make clean". I'd be happy to see a patch that moves to a different set of semantics or an addition to t/t7300-clean.sh and BUGS section in Documentation/git-clean.txt explaining the current limitations, if someone wants to work on that. Thanks, both. Jonathan