Re: [RFC] git rm -u
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 25, 2013, 19:47 UTC
- Message-ID
- <7v621gxjjx.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <vpqliac41zf.fsf@grenoble-inp.fr>
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
Show 12 quoted lines
> Antoine Pelisse <apelisse@gmail.com> writes: > >>> "git rm" really seems to be a better place for removing files from the >>> index. >> >> Then, I don't exactly understand the meaning of git-rm but being a >> _shortcut_ for "remove and stage". > > "git rm --cached" is exactly "remove from index". > > And even without --cached, as you notice yourself, it does a "remove and > stage [removal]", so why would it be inappropriate to stage a removal?
I do not think "git rm" is a bad place to add the feature; I was questioning if "-u" is an appropriate option. The option "-u" given to "git add" is internally called "take worktree changes", and we would need the option to "git rm" with that internal meaning. The superficial meaning "updated" that "-u" in "add -u" stands for does not really match what "git rm --take-worktree-changes" wants to do, as we obviously do not want to remove all updated/modified files.