threads / rfc / 13715

[RFC] Rename git-rm --cached to --index

Subject: [RFC] Rename git-rm --cached to --index

## tl;dr

3 messages between May 28, 2008 and May 28, 2008.

replies: 2people: 3as markdown or json

Nico -telmich- Schottelius· May 28, 2008, 23:14 UTC · lore
Hello!

I just re-read the git-rm manpage and recognized git-rm knows about the --cached option. As in current git we do not talk about the cache, but about the index, it would imho make sense to rename --cache to --index in a user friendly way:

- add --index to git-rm
- add --index to manpage of git-rm
- still support --cached in git-rm
- add hint in manpage that --cached is old naming style

I think naming it --index would make life more consistent for new users of git.

Now I'm interested in your opinion ;-)
Sincerly
Nico
P.S.: As always, please CC me on reply
-- 
Think about Free and Open Source Software (FOSS).
http://nico.schottelius.org/documentations/foss/the-term-foss/

PGP: BFE4 C736 ABE5 406F 8F42  F7CF B8BE F92A 9885 188C
Junio C Hamano· May 28, 2008, 23:25 UTC · re: Nico -telmich- Schottelius · lore

Re: [RFC] Rename git-rm --cached to --index

Please don't make naming inconsistent. --index means "do things that usually affect only work tree also to the index as well", while --cached means "act only on the index" (study "git apply" for another example).

"git rm" that does not touch work tree but removes only the index entry should be named --cached.

Wincent Colaiuta· May 28, 2008, 23:57 UTC · re: Junio C Hamano · lore

Re: [RFC] Rename git-rm --cached to --index

El 29/5/2008, a las 1:25, Junio C Hamano escribió:
Show 8 quoted lines
> Please don't make naming inconsistent.  --index means "do things that
> usually affect only work tree also to the index as well", while -- 
> cached
> means "act only on the index" (study "git apply" for another example).
>
> "git rm" that does not touch work tree but removes only the index  
> entry
> should be named --cached.

I think this is a bit of an arcane distinction. I wonder if a more intuitive scheme might be:

   "--index" as it is now (for "do things that usually affect only  
work tree also to the index as well")
And:
   "--index-only" for "act only on the index"

Although the latter is more characters to type than "--cached", it is a hell of a lot less surprising. For the typing-phobic there's always completion.

Let the arguments about bikeshed color and breaking people's scripts ensue!

Cheers, Wincent

← back to recent threads