git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Wincent Colaiuta <win@wincent.com>
Date
May 28, 2008, 23:57 UTC
Message-ID
<58CD1F67-D406-44BF-A3E2-DB57FD1742EC@wincent.com>
In-Reply-To
<7vprr6roxt.fsf@gitster.siamese.dyndns.org>
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

Previous: Junio C Hamano
Message 3 of 3 in “[RFC] Rename git-rm --cached to --index”
  1. Nico -telmich- SchotteliusMay 28, 2008
  2. Junio C HamanoMay 28, 2008
  3. Wincent ColaiutaMay 28, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.