[RFC] Second attempt at making git-clean a builtin

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Shawn Bohrer
Date: Sunday, November 4, 2007 - 12:02 pm

I've taken all of the comments I received from my previous attempt see:

http://marc.info/?l=git&m=119181975419521&w=2

With these new changes in place my new git-clean passes all of the
original tests as well as the new tests I've added.  While looking at
how git-ls-files walks the tree there were some things that didn't quite
understand, or thought might be unnecessary so there may be some things I
missed.  For example I'm still not quite sure what verify_pathspec()
does.

I did however notice what I would call a bug in the behavior of
git-ls-files and therefore the current git-clean.sh.  With the current
git-clean if you have two directories that contain only untracked files,
for example docs/ and examples/ running:

git clean docs/ examples/

will not remove either directory.  Instead you must use the -d
parameter.  To me this makes sense, however if you run:

git clean docs/

it will remove the docs directory without using the -d parameter.  My
patch is at least consistent in that it requires the -d in both cases.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC] Second attempt at making git-clean a builtin, Shawn Bohrer, (Sun Nov 4, 12:02 pm)
[PATCH] Add more tests for git-clean, Shawn Bohrer, (Sun Nov 4, 12:02 pm)
[PATCH] Make git-clean a builtin, Shawn Bohrer, (Sun Nov 4, 12:02 pm)
Re: [PATCH] Make git-clean a builtin, Pierre Habouzit, (Sun Nov 4, 12:41 pm)
[PATCH 3/2] Use parse-options in builtin-clean, Johannes Schindelin, (Sun Nov 4, 1:24 pm)
Re: [PATCH 3/2] Use parse-options in builtin-clean, Pierre Habouzit, (Sun Nov 4, 2:16 pm)
Re: [PATCH] Add more tests for git-clean, Junio C Hamano, (Sun Nov 4, 4:35 pm)
Re: [PATCH] Add more tests for git-clean, Pierre Habouzit, (Sun Nov 4, 4:46 pm)
Re: [PATCH] Add more tests for git-clean, Johannes Schindelin, (Sun Nov 4, 4:49 pm)
Re: [PATCH] Add more tests for git-clean, Junio C Hamano, (Sun Nov 4, 5:17 pm)