Thread (5 messages) flat view 5 messages, 3 authors, 2016-06-15

Re: Unexpected "clean -Xd" behavior

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:52:49

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help