{"thread":{"id":"64604","subject":"About --staged ang --cached","startedAt":"2025-12-09T19:03:25Z","lastAt":"2025-12-10T02:13:38Z","messageCount":3,"participants":["Lucas Seiki Oshiro","Junio C Hamano","Jacob Keller"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"531911","messageId":"FD2160CA-DD56-4BDE-92B4-0859C3BD2396@gmail.com","threadId":"64604","inReplyTo":null,"subject":"About --staged ang --cached","fromName":"Lucas Seiki Oshiro","fromEmail":"lucasseikioshiro@gmail.com","sentAt":"2025-12-09T19:03:11Z","receivedAt":"2025-12-09T19:03:25Z","isPatch":false,"sender":{"key":"lucasseikioshiro@gmail.com","avatar":"https://avatars.githubusercontent.com/u/12701580?v=4"},"body":"Hi!\n\nEven though the name \"cache\" is considered obsolete for a long time (for\nexample, gitglossary calls it \"obsolete\" since 2005 [1]), there are some\ncommands that still uses the flag --cached to operate on the index (e.g.\ngit-rm, git-grep), while newer commands (e.g., git-restore, git-stash)\nuse --staged. git-diff is special case where both flags exist and they\nare synonyms since [2].\n\nPersonally, I'm used to type `git diff --staged` instead of `--cached`,\nand my muscle memory often makes me type `git rm --staged` instead of\n`git rm --cached`.\n\nDo you think that it would be relevant to add --staged to the other\ncommands just like [2] did to git-diff? Perhaps this is just a personal\nissue, but I find it curious that those commands still have a flag named\nafter an obsolete name while newer commands are using --staged.\n\nThanks!\n\n\n[1] f1671ecbfa ([PATCH] Assorted changes to glossary, 2005-08-18)\n[2] 2baf1850ce (git-diff: Add --staged as a synonym for --cached., 2008-10-29)"},{"id":"531934","messageId":"xmqqpl8ni7bo.fsf@gitster.g","threadId":"64604","inReplyTo":"FD2160CA-DD56-4BDE-92B4-0859C3BD2396@gmail.com","subject":"Re: About --staged ang --cached","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-12-09T23:06:19Z","receivedAt":"2025-12-09T23:06:24Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Lucas Seiki Oshiro <lucasseikioshiro@gmail.com> writes:\n\n> Do you think that it would be relevant to add --staged to the other\n> commands just like [2] did to git-diff? Perhaps this is just a personal\n> issue, but I find it curious that those commands still have a flag named\n> after an obsolete name while newer commands are using --staged.\n\nAs long as \"Only in the index\" aspect of the name is kept, I do not\nthink the exact phrasing matters all that match.  The distinction\nbetween \"apply --cached\" vs \"apply --index\" must be expressable even\nif you swap \"--cached\" with something else.\n\nWould it be simpler to remove the label \"obsoleted\" from the name,\nand remove the \"--staged\" synonym?\n"},{"id":"531940","messageId":"CA+P7+xr6HHCXsiXi=CDm=rccNO4b6gmjLbuWt4KLAEwSs20aww@mail.gmail.com","threadId":"64604","inReplyTo":"xmqqpl8ni7bo.fsf@gitster.g","subject":"Re: About --staged ang --cached","fromName":"Jacob Keller","fromEmail":"jacob.keller@gmail.com","sentAt":"2025-12-10T02:13:26Z","receivedAt":"2025-12-10T02:13:38Z","isPatch":false,"sender":{"key":"jacob.keller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/874719?v=4"},"body":"On Tue, Dec 9, 2025 at 3:07 PM Junio C Hamano <gitster@pobox.com> wrote:\n>\n> Lucas Seiki Oshiro <lucasseikioshiro@gmail.com> writes:\n>\n> > Do you think that it would be relevant to add --staged to the other\n> > commands just like [2] did to git-diff? Perhaps this is just a personal\n> > issue, but I find it curious that those commands still have a flag named\n> > after an obsolete name while newer commands are using --staged.\n>\n> As long as \"Only in the index\" aspect of the name is kept, I do not\n> think the exact phrasing matters all that match.  The distinction\n> between \"apply --cached\" vs \"apply --index\" must be expressable even\n> if you swap \"--cached\" with something else.\n>\n> Would it be simpler to remove the label \"obsoleted\" from the name,\n> and remove the \"--staged\" synonym?\n>\n\nI think it makes more sense to add a --staged synonym to commands with\n--cached, than to go back the other way.\n"}]}