All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthieu Moy <Matthieu.Moy@imag.fr>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org, Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH] More permissive "git-rm --cached" behavior without -f.
Date: Fri, 13 Jul 2007 20:53:38 +0200	[thread overview]
Message-ID: <vpq8x9kp231.fsf@bauges.imag.fr> (raw)
In-Reply-To: <20070713175737.GA20416@coredump.intra.peff.net> (Jeff King's message of "Fri\, 13 Jul 2007 13\:57\:37 -0400")

Jeff King <peff@peff.net> writes:

> On Fri, Jul 13, 2007 at 07:41:38PM +0200, Matthieu Moy wrote:
>
>> Previously, the index had to match the file *and* the HEAD. With
>> --cached, the index must now match the file *or* the HEAD. The behavior
>> without --cached is unchanged, but provides better error messages.
>
> This does make more sense, but there are still some inconsistencies. Is
> it OK to lose content that is only in the index, or not?

I'd say it isn't OK. At least, that's what the previous git-rm
considered.

> If it is OK, then --cached shouldn't need _any_ safety valve (and after
> all, anything you remove in that manner is recoverable with git-fsck
> until the next prune).
>
> If it isn't OK, then you are not addressing the cases where git-rm
> without --cached loses index content (that is different than HEAD and
> the working tree).

Either I didn't understand your question, or the answer is "yes, I
do.". The behavior without --cached is not modified, except for the
error message, and the previous was to require -f whenever the index
doesn't match the head, *or* doesn't match the file. So, without
--cached, you need to have file=index=HEAD to be able to git-rm.

If I missunderstand you, please, provide a senario where my patch
doesn't do the expected.

-- 
Matthieu

  reply	other threads:[~2007-07-13 18:54 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-02 18:09 git-rm isn't the inverse action of git-add Christian Jaeger
2007-07-02 19:42 ` Yann Dirson
2007-07-02 20:23   ` Christian Jaeger
2007-07-02 20:40     ` Yann Dirson
2007-07-02 20:54       ` Matthieu Moy
2007-07-02 21:05         ` Johannes Schindelin
2007-07-03 10:37           ` Matthieu Moy
2007-07-03 12:09             ` Johannes Schindelin
2007-07-03 13:40               ` Matthieu Moy
2007-07-03 14:21                 ` Johannes Schindelin
2007-07-04 20:08                 ` Jan Hudec
2007-07-05 13:44                   ` Matthieu Moy
2007-07-05 14:00                     ` David Kastrup
2007-07-08 17:36                     ` [RFC][PATCH] " Matthieu Moy
2007-07-08 18:10                       ` Johannes Schindelin
2007-07-08 20:34                         ` Matthieu Moy
2007-07-08 21:49                           ` Johannes Schindelin
2007-07-09  9:45                             ` Matthieu Moy
2007-07-13 17:36                             ` Matthieu Moy
2007-07-13 17:41                               ` [PATCH] More permissive "git-rm --cached" behavior without -f Matthieu Moy
2007-07-13 17:57                                 ` Jeff King
2007-07-13 18:53                                   ` Matthieu Moy [this message]
2007-07-14  3:42                                     ` Jeff King
2007-07-14  0:44                                 ` Jakub Narebski
2007-07-14  6:52                                 ` Junio C Hamano
2007-07-14  7:16                                   ` Junio C Hamano
2007-07-14 10:14                                     ` Matthieu Moy
2007-07-02 21:20       ` git-rm isn't the inverse action of git-add Christian Jaeger
2007-07-03  4:12         ` Jeff King
2007-07-03  4:47           ` Junio C Hamano
2007-07-03  4:59             ` Jeff King
2007-07-03  5:09               ` Junio C Hamano
2007-07-03  5:12                 ` Jeff King
2007-07-03  6:26                   ` Junio C Hamano
2007-07-11 12:20     ` Jakub Narebski
2007-07-11 18:56       ` Jan Hudec
2007-07-11 21:26         ` Junio C Hamano

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=vpq8x9kp231.fsf@bauges.imag.fr \
    --to=matthieu.moy@imag.fr \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.