git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-clean and empty pathspec
@ 2007-12-06 18:21 Nguyen Thai Ngoc Duy
  2007-12-07  6:14 ` Shawn Bohrer
  0 siblings, 1 reply; 2+ messages in thread
From: Nguyen Thai Ngoc Duy @ 2007-12-06 18:21 UTC (permalink / raw)
  To: Git Mailing List

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: git-clean and empty pathspec
  2007-12-06 18:21 git-clean and empty pathspec Nguyen Thai Ngoc Duy
@ 2007-12-07  6:14 ` Shawn Bohrer
  0 siblings, 0 replies; 2+ messages in thread
From: Shawn Bohrer @ 2007-12-07  6:14 UTC (permalink / raw)
  To: Nguyen Thai Ngoc Duy; +Cc: Git Mailing List

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-12-07  6:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-06 18:21 git-clean and empty pathspec Nguyen Thai Ngoc Duy
2007-12-07  6:14 ` Shawn Bohrer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).