Thread (8 messages) flat view 8 messages, 4 authors, 2016-06-15

Re: v1.5.4 plans

From: Andreas Ericsson <hidden>
Date: 2016-06-15 22:43:58

Possibly related (same subject, not in this thread)

Junio C Hamano wrote:
Jeff King [off-list ref] writes:
quoted
 - 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help