From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Mike Hommey <mh@glandium.org>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] Don't require working tree for git-rm
Date: Sat, 3 Nov 2007 11:56:17 +0000 (GMT) [thread overview]
Message-ID: <Pine.LNX.4.64.0711031155070.4362@racer.site> (raw)
In-Reply-To: <1194084521-12962-1-git-send-email-mh@glandium.org>
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@glandium.org>
> ---
> 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
next prev parent reply other threads:[~2007-11-03 11:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-03 10:08 [PATCH] Don't require working tree for git-rm Mike Hommey
2007-11-03 11:56 ` Johannes Schindelin [this message]
2007-11-03 12:11 ` Mike Hommey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0711031155070.4362@racer.site \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=mh@glandium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).