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

3 messages from 2008-05-28 to 2008-05-28. Participants: Nico -telmich- Schottelius, Junio C Hamano, Wincent Colaiuta.
Thread: https://gitlist.dev/t/13715

## Nico -telmich- Schottelius, 2008-05-28 23:14

Subject: [RFC] Rename git-rm --cached to --index
Message-ID: <20080528231405.GA25416@denkbrett.schottelius.org>
URL: https://gitlist.dev/e/20080528231405.GA25416%40denkbrett.schottelius.org

```
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, 2008-05-28 23:25

Subject: Re: [RFC] Rename git-rm --cached to --index
Message-ID: <7vprr6roxt.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vprr6roxt.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <20080528231405.GA25416@denkbrett.schottelius.org>

```
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, 2008-05-28 23:57

Subject: Re: [RFC] Rename git-rm --cached to --index
Message-ID: <58CD1F67-D406-44BF-A3E2-DB57FD1742EC@wincent.com>
URL: https://gitlist.dev/e/58CD1F67-D406-44BF-A3E2-DB57FD1742EC%40wincent.com
In-Reply-To: <7vprr6roxt.fsf@gitster.siamese.dyndns.org>

```
El 29/5/2008, a las 1:25, Junio C Hamano escribió:
> 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

```
