Thread (4 messages) flat view 4 messages, 3 authors, 2016-06-15

Re: [PATCH] More permissive "git-rm --cached" behavior without -f.

From: Jeff King <hidden>
Date: 2016-06-15 22:43:21

Possibly related (same subject, not in this thread)

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?

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).

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help