Re: [PATCH v1 00/11] And new command "restore"
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 13, 2019, 22:58 UTC
- Message-ID
- <xmqqr2bacrgf.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <CACsJy8BB1GAaBX=YcmNf1fLj5chc5hcvHLTwvzwJgvSWWKNFdQ@mail.gmail.com>
Duy Nguyen <pclouds@gmail.com> writes:
Show 9 quoted lines
> On Fri, Mar 8, 2019 at 5:17 PM Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote: >> - --index has a different meaning in git-apply. I don't have a good >> suggestion except "yeah we have two different worlds now, the old >> and the new one" > > I will rename --index to --staged to avoid this. It is already used as > synonym for --cached in git-diff. I will also add --staged as synonym > to "git rm" so that "git status" can consistently advise "git <verb> > --staged" where verb is either restore or rm.
Does "restore --index" (now "--staged") work the same way as "--cached" aka "--staged" in git-diff? "--cached" is about affecting only what is in the index (as opposed to "--index" affecting both the index and the working tree).
If it does, then calling it "--cached" aka "--staged" does make more sense than calling it "--index", I would think. Otherwise, such a rename does not buy us much.