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

Re: A few usability question about git diff --cached

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 4, 2007, 14:40 UTC
Message-ID
<7vhcl79c4l.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<Pine.LNX.4.64.0710041534000.4174@racer.site>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 6 quoted lines
> On Thu, 4 Oct 2007, Junio C Hamano wrote:
>
>>  * --cached means work only on index and ignore work tree.
>
> I guess I could live with "--staged" as a synonym for "--cached" (and 
> maybe deprecating "--cached").
A handy mnemonic might be:
 * --index means work work tree through the index.  Once you get
   git, this is natural as you would not interact with files in
   the work tree that is not known to the index.
 * --cached means work only on the cached information in index.

Any change like swapping them or renaming --cached to --index and making something else to mean what --index always meant will break existing setups and people's scripts. Won't happen.

Giving them synonyms without deprecation is a viable option, if necessary. I do not however see the need yet. A few people who haven't learned the lingo of the land yet can worry about possible confusion, but I do not think that "worry" itself does not count as real need.

Previous: Johannes SchindelinNext: David Kastrup
Message 12 of 20 in “A few usability question about git diff --cached”
  1. Paolo CiarrocchiOct 4, 2007
  2. Wincent ColaiutaOct 4, 2007
  3. Miles BaderOct 5, 2007
  4. Wincent ColaiutaOct 5, 2007
  5. Miles BaderOct 5, 2007
  6. Miklos VajnaOct 4, 2007
  7. Paolo CiarrocchiOct 4, 2007
  8. Junio C HamanoOct 4, 2007
  9. Paolo CiarrocchiOct 4, 2007
  10. Wincent ColaiutaOct 4, 2007
  11. Johannes SchindelinOct 4, 2007
  12. Junio C HamanoOct 4, 2007
  13. David KastrupOct 4, 2007
  14. Matthieu MoyOct 4, 2007
  15. J. Bruce FieldsOct 4, 2007
  16. Matthieu MoyOct 4, 2007
  17. J. Bruce FieldsOct 4, 2007
  18. Matthieu MoyOct 5, 2007
  19. David TweedOct 5, 2007
  20. Wincent ColaiutaOct 4, 2007

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.