{"thread":{"id":"10610","subject":"[PATCH] Don't require working tree for git-rm","startedAt":"2007-11-03T10:08:41Z","lastAt":"2007-11-03T12:11:50Z","messageCount":3,"participants":["Mike Hommey","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"58091","messageId":"1194084521-12962-1-git-send-email-mh@glandium.org","threadId":"10610","inReplyTo":null,"subject":"[PATCH] Don't require working tree for git-rm","fromName":"Mike Hommey","fromEmail":"mh@glandium.org","sentAt":"2007-11-03T10:08:41Z","receivedAt":"2007-11-03T10:08:41Z","isPatch":true,"sender":{"key":"mh@glandium.org","avatar":"https://avatars.githubusercontent.com/u/1038527?v=4"},"body":"This allows to do git rm --cached -r directory, instead of\ngit ls-files -z directory | git update-index --remove -z --stdin.\nThis can be particularly useful for git-filter-branch users.\n\nSigned-off-by: Mike Hommey <mh@glandium.org>\n---\n git.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git.c b/git.c\nindex 4e10581..01dcb6a 100644\n--- a/git.c\n+++ b/git.c\n@@ -345,7 +345,7 @@ static void handle_internal_command(int argc, const char **argv)\n \t\t{ \"rev-list\", cmd_rev_list, RUN_SETUP },\n \t\t{ \"rev-parse\", cmd_rev_parse, RUN_SETUP },\n \t\t{ \"revert\", cmd_revert, RUN_SETUP | NEED_WORK_TREE },\n-\t\t{ \"rm\", cmd_rm, RUN_SETUP | NEED_WORK_TREE },\n+\t\t{ \"rm\", cmd_rm, RUN_SETUP },\n \t\t{ \"runstatus\", cmd_runstatus, RUN_SETUP | NEED_WORK_TREE },\n \t\t{ \"shortlog\", cmd_shortlog, RUN_SETUP | USE_PAGER },\n \t\t{ \"show-branch\", cmd_show_branch, RUN_SETUP },\n-- \n1.5.3.5\n"},{"id":"58106","messageId":"Pine.LNX.4.64.0711031155070.4362@racer.site","threadId":"10610","inReplyTo":"1194084521-12962-1-git-send-email-mh@glandium.org","subject":"Re: [PATCH] Don't require working tree for git-rm","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-11-03T11:56:17Z","receivedAt":"2007-11-03T11:56:17Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sat, 3 Nov 2007, Mike Hommey wrote:\n\n> This allows to do git rm --cached -r directory, instead of\n> git ls-files -z directory | git update-index --remove -z --stdin.\n> This can be particularly useful for git-filter-branch users.\n> \n> Signed-off-by: Mike Hommey <mh@glandium.org>\n> ---\n>  git.c |    2 +-\n>  1 files changed, 1 insertions(+), 1 deletions(-)\n> \n> diff --git a/git.c b/git.c\n> index 4e10581..01dcb6a 100644\n> --- a/git.c\n> +++ b/git.c\n> @@ -345,7 +345,7 @@ static void handle_internal_command(int argc, const char **argv)\n>  \t\t{ \"rev-list\", cmd_rev_list, RUN_SETUP },\n>  \t\t{ \"rev-parse\", cmd_rev_parse, RUN_SETUP },\n>  \t\t{ \"revert\", cmd_revert, RUN_SETUP | NEED_WORK_TREE },\n> -\t\t{ \"rm\", cmd_rm, RUN_SETUP | NEED_WORK_TREE },\n> +\t\t{ \"rm\", cmd_rm, RUN_SETUP },\n\nJust removing this is wrong!\n\nYou have to test for a working tree if \"--cached\" was _not_ given.  \n\nCiao,\nDscho\n"},{"id":"58112","messageId":"20071103121150.GB4295@glandium.org","threadId":"10610","inReplyTo":"Pine.LNX.4.64.0711031155070.4362@racer.site","subject":"Re: [PATCH] Don't require working tree for git-rm","fromName":"Mike Hommey","fromEmail":"mh@glandium.org","sentAt":"2007-11-03T12:11:50Z","receivedAt":"2007-11-03T12:11:50Z","isPatch":true,"sender":{"key":"mh@glandium.org","avatar":"https://avatars.githubusercontent.com/u/1038527?v=4"},"body":"On Sat, Nov 03, 2007 at 11:56:17AM +0000, Johannes Schindelin wrote:\n> Hi,\n> \n> On Sat, 3 Nov 2007, Mike Hommey wrote:\n> \n> > This allows to do git rm --cached -r directory, instead of\n> > git ls-files -z directory | git update-index --remove -z --stdin.\n> > This can be particularly useful for git-filter-branch users.\n> > \n> > Signed-off-by: Mike Hommey <mh@glandium.org>\n> > ---\n> >  git.c |    2 +-\n> >  1 files changed, 1 insertions(+), 1 deletions(-)\n> > \n> > diff --git a/git.c b/git.c\n> > index 4e10581..01dcb6a 100644\n> > --- a/git.c\n> > +++ b/git.c\n> > @@ -345,7 +345,7 @@ static void handle_internal_command(int argc, const char **argv)\n> >  \t\t{ \"rev-list\", cmd_rev_list, RUN_SETUP },\n> >  \t\t{ \"rev-parse\", cmd_rev_parse, RUN_SETUP },\n> >  \t\t{ \"revert\", cmd_revert, RUN_SETUP | NEED_WORK_TREE },\n> > -\t\t{ \"rm\", cmd_rm, RUN_SETUP | NEED_WORK_TREE },\n> > +\t\t{ \"rm\", cmd_rm, RUN_SETUP },\n> \n> Just removing this is wrong!\n> \n> You have to test for a working tree if \"--cached\" was _not_ given.  \n\nSee the other patch I sent a bit later.\n\nMike\n"}]}