On Fri, Aug 22, 2014 at 07:41:46AM -0400, Paul Smith wrote:
> On Fri, 2014-08-22 at 10:05 +0200, Magnus Therning wrote:
> > On Thu, Aug 21, 2014 at 10:16:08PM -0400, Paul Smith wrote:
> > >>> Does it seem incorrect to anyone else that "git clean -X" doesn't
> > >>> delete all the files in your workspace that are considered ignored
> > >>> by "git status"?
> > 
> > Well, reading the man page for `git clean` like a lawyer (my emphasis
> > below):
> > 
> >    -X     Remove only *files* ignored by Git. This may be useful to
> >           rebuild everything from scratch, but keep manually created
> >           files.
> > 
> > So, it could be argued it does what it says, it removes all *files*
> > ignored by git, not ignored *folders*.
> Yes, but that's what the -d option is for.  You'll note that the -x
> option has similar language regarding files.

No, not quite, this is from the man page again:

  -d     Remove untracked directories in addition to untracked files.

So, again when reading it as a lawyer, the folder is not untracked,
it's ignored.  The behaviour of `git clean -dX` when hitting an
ignored folder is therefore unspecified.

As is the experience of every C programmer, unspecified stuff is a
source of much trouble.  So I'd say that's another reason to raising a
bug ;)


Magnus Therning                      OpenPGP: 0xAB4DFBA4 
email: mag...@therning.org   jabber: mag...@therning.org
twitter: magthe               http://therning.org/magnus

Code as if whoever maintains your program is a violent psychopath who knows
where you live.
     -- Anonymous

Attachment: pgpBum_vN5qvM.pgp
Description: PGP signature

Reply via email to