Message ID | 20190308101655.9767-1-pclouds@gmail.com (mailing list archive) |
---|---|
Headers | show |
Series | And new command "restore" | expand |
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. Since option rename is a lot of work. If you think this is not a good move, raise it now, even if it's just "I don't like it, no reasons".
On March 10, 2019 4:19:28 AM PDT, Duy Nguyen <pclouds@gmail.com> wrote: >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. > >Since option rename is a lot of work. If you think this is not a good >move, raise it now, even if it's just "I don't like it, no reasons". For what it's worth, I think this is a good rename. Thanks, Jake
On Sun, Mar 10, 2019 at 4:19 AM Duy Nguyen <pclouds@gmail.com> wrote: > > 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. > > Since option rename is a lot of work. If you think this is not a good > move, raise it now, even if it's just "I don't like it, no reasons". > -- Works for me, but this sounds like the kind of thing Junio might object to, so I'm curious about his input.
Duy Nguyen <pclouds@gmail.com> writes: > 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.
On Thu, Mar 14, 2019 at 5:58 AM Junio C Hamano <gitster@pobox.com> wrote: > > Duy Nguyen <pclouds@gmail.com> writes: > > > 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). Yes. To affect both you would need --staged --worktree (or -WS for short because I don't think anybody is going to type that many characters) > 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.