Re: Proposal: adding --soft and --mixed options to git checkout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Felipe Contreras wrote:
> In my opinion it's pretty clear `--soft` and `--mixed` were terrible names and
> I suggested in the past to rename them to `--no-stage` and `--stage` [1]. We
> should not repeat those mistakes with `git checkout`.

No problem with renaming, but this might also be an oppurtunity to reconsider the meaning of the two options to incorporate `--keep-index`. Maybe `--no-stage` should mean 'switch HEAD and the working tree but leave the staging area' (i.e. the equivalent of `--keep-index`), and `--no-work` should mean 'switch HEAD and the staging area but leave the working tree' (i.e. the equivalent of `--mixed`). `--soft` could then be achieved by combining these options: `--no-stage --no-work`, but it could be a worthwhile convenience to add a separate option for that (just moving the HEAD), so maybe `--head` or something like that.

> In my mind the whole point of `git checkout` is to update the work-tree, if the
> command is not going to do that, then I don't think it should be `git
> checkout`.

I suppose something similar could also be said about `git reset` though? Maybe this would support the general move away from those legacy commands towards the new set of commands, so putting these new options in `git switch` instead seems reasonable.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux