git-clean and empty pathspec

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

git-clean and empty pathspec

From: Nguyen Thai Ngoc Duy <hidden>
Date: 2016-06-15 22:43:56

"git clean -n" would not remove directories while "git clean -n -- ''"
(two single quotes) would. Is there anything wrong with it?
-- 
Duy

Re: git-clean and empty pathspec

From: Shawn Bohrer <hidden>
Date: 2016-06-15 22:43:57

On Fri, Dec 07, 2007 at 01:21:10AM +0700, Nguyen Thai Ngoc Duy wrote:
"git clean -n" would not remove directories while "git clean -n -- ''"
(two single quotes) would. Is there anything wrong with it?
It appears that match_pathspec views this as a recursive match to
everything, so git clean thinks that you provided the pathspec for all
files and directories and thus will remove them.

Without the '' there is no provided pathspec so git clean will not
remove the directories without -d.

Note this is different behavior from the old git-clean.sh.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help