<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/contrib/examples/git-clean.sh, branch v1.6.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v1.6.3</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v1.6.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2007-11-19T03:11:42Z</updated>
<entry>
<title>Make git-clean a builtin</title>
<updated>2007-11-19T03:11:42Z</updated>
<author>
<name>Shawn Bohrer</name>
<email>shawn.bohrer@gmail.com</email>
</author>
<published>2007-11-12T01:48:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=113f10f22f4b3b599e44e192e241e0bace9cc39e'/>
<id>urn:sha1:113f10f22f4b3b599e44e192e241e0bace9cc39e</id>
<content type='text'>
This replaces git-clean.sh with builtin-clean.c, and moves
git-clean.sh to the examples.

This also introduces a change in behavior when removing directories
explicitly specified as a path.  For example currently:

1. When dir has only untracked files, these two behave differently:

    $ git clean -n dir
    $ git clean -n dir/

the former says "Would not remove dir/", while the latter would say
"Would remove dir/untracked" for all paths under it, but not the
directory itself.

With -d, the former would stop refusing, however since the user
explicitly asked to remove the directory the -d is no longer required.

2. When there are more parameters:

    $ git clean -n dir foo
    $ git clean -n dir/ foo

both cases refuse to remove dir/ unless -d is specified.  Once again
since both cases requested to remove dir the -d is no longer required.

Thanks to Johannes Schindelin for the conversion to using the
parse-options API.

Signed-off-by: Shawn Bohrer &lt;shawn.bohrer@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
