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

A few usability question about git diff --cached

From
PCPaolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Date
Oct 4, 2007, 12:27 UTC
Message-ID
<4d8e3fd30710040527j61152b2dh1b073504ba19d490@mail.gmail.com>

Hi all, I'm having and interesting discussion with an happy mercurial users which started reading the git documentation. He raised aquestion that I'm not able to answer:

Show 5 quoted lines
> $ git diff --cached
>
> (Without —cached, git-diff(1) will show you any changes that you've
> made but not yet added to the index.) You can also get a brief summary
> of the situation with git-status(1):
Why do we have the option "--cached" and not "--index"?

I believe that, just reading the documentation, is not very easy to fully understand the role of the index and then we have an option "--cached" that refers to the index. Is it a good idea to add and document an option "--index" and remove from the doc the option "--cached"?

Thanks.
Regards,
-- 
Paolo
http://paolo.ciarrocchi.googlepages.com/
Next: Wincent Colaiuta
Message 1 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.