Hi, On Sat, 3 Nov 2007, Mike Hommey wrote: > This allows to do git rm --cached -r directory, instead of > git ls-files -z directory | git update-index --remove -z --stdin. > This can be particularly useful for git-filter-branch users. > > Signed-off-by: Mike Hommey <mh@xxxxxxxxxxxx> > --- > git.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/git.c b/git.c > index 4e10581..01dcb6a 100644 > --- a/git.c > +++ b/git.c > @@ -345,7 +345,7 @@ static void handle_internal_command(int argc, const char **argv) > { "rev-list", cmd_rev_list, RUN_SETUP }, > { "rev-parse", cmd_rev_parse, RUN_SETUP }, > { "revert", cmd_revert, RUN_SETUP | NEED_WORK_TREE }, > - { "rm", cmd_rm, RUN_SETUP | NEED_WORK_TREE }, > + { "rm", cmd_rm, RUN_SETUP }, Just removing this is wrong! You have to test for a working tree if "--cached" was _not_ given. Ciao, Dscho - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html