summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7d8ae93)
raw | patch | inline | side by side (parent: 7d8ae93)
author | Mike Hommey <mh@glandium.org> | |
Sat, 3 Nov 2007 11:23:13 +0000 (12:23 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 6 Nov 2007 06:47:57 +0000 (22:47 -0800) |
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@glandium.org>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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@glandium.org>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-rm.c | patch | blob | history | |
git.c | patch | blob | history |
diff --git a/builtin-rm.c b/builtin-rm.c
index bca2bd97036fdaf2e2bf99e308ba62e1acf4d9e8..a3d25e6a571584c486d252c5a8e2b182f3da86e3 100644 (file)
--- a/builtin-rm.c
+++ b/builtin-rm.c
if (!argc)
usage_with_options(builtin_rm_usage, builtin_rm_options);
+ if (!index_only)
+ setup_work_tree();
+
pathspec = get_pathspec(prefix, argv);
seen = NULL;
for (i = 0; pathspec[i] ; i++)
index eb31c93d0f70abdd6230d72f555adbfb121df613..4a250f7e8b84f2334c84daaf93baa0fe1f0ca344 100644 (file)
--- a/git.c
+++ b/git.c
{ "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 },
{ "runstatus", cmd_runstatus, RUN_SETUP | NEED_WORK_TREE },
{ "shortlog", cmd_shortlog, RUN_SETUP | USE_PAGER },
{ "show-branch", cmd_show_branch, RUN_SETUP },