On Fri, 2014-08-22 at 21:05 +0200, Magnus Therning wrote:
> 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:
> > > 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.

Hm.  I think the wording in the man page is incorrect or at least too
loose.  It's not possible in Git to ever have a "tracked directory"; Git
doesn't store "directories" per se.  A directory comes into existence
only because there's a tracked file in it.

So, "untracked directories" is, at the level of lawyer-ese anyway,
meaningless.  However we can assume that they mean to say "directories
which contain no tracked files" here.  Which would give the behavior I
want.  I think.  :-).

> 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 ;)

I've found some threads on the git mailing list from 2010 and 2012 about
this issue.  It doesn't seem like consensus was reached.  I'm going to
construct a followup for that list and try to push it forward.


You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to