Subject: Re: v1.5.4 plans

From: Andreas Ericsson <[email-masked]>
Date: Tue, 11 Dec 2007 08:05:51 +0100

Junio C Hamano wrote:
> Jeff King <[email-masked]> writes:
> 
>>  - git-clean's handling of directory wildcards. I didn't get a response
>>    to
>>
>>      http://mid.gmane.org/[email-masked]
>>
>>    I suspect there are still some bugs lurking in there, but it's hard
>>    to say because I don't know what the behavior _should_ be (there are
>>    some test cases in that email).
> 
> The last time I looked at the "directory" side of builtin-clean.c, I had
> to quickly reach for my barf bag.  I never use "git clean" without "-n"
> and I never ever use "git clean" with "-d"; I do not have any idea what
> behaviour when given "-d" would be useful.

When you have a trash directory without any tracked files, clean will not
by default descend into that directory and thus won't remove neither files
nor directory. I frequently use one for automated testing, much like git's
trash repository, but the only time I do "git clean -d" is when building
things on a release-server with the repository checked out. It's faster
than "make distclean", and not all of our projects have a Makefile to begin
with. Tacking "git clean -d" at the end of test-scripts makes it simple to
remove all excess cruft in one go.

So in short, git clean -d can be useful. I have no idea when "git clean dir"
would be though.

-- 
Andreas Ericsson                   [email-masked]
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231