Re: v1.5.4 plans
- From
Andreas Ericsson <ae@op5.se>
- Date
- Dec 11, 2007, 07:05 UTC
- Message-ID
- <475E36CF.7050207@op5.se>
- In-Reply-To
- <7vtzmqhvgq.fsf@gitster.siamese.dyndns.org>
Junio C Hamano wrote:
Show 15 quoted lines
> Jeff King <peff@peff.net> writes: > >> - git-clean's handling of directory wildcards. I didn't get a response >> to >> >> http://mid.gmane.org/20071206043247.GC5499@coredump.intra.peff.net >> >> 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 andreas.ericsson@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231