Re: [PATCH v3 07/14] checkout: split into switch-branch and restore-files

2018-12-04 Thread Junio C Hamano
Elijah Newren writes: > What depends on stage#2 coming from the commit that will become the > first parent? How about "git diff --cc" for a starter? What came from HEAD's ancestry should appear first and then what came from the side branch that is merged into.

Re: [PATCH v3 07/14] checkout: split into switch-branch and restore-files

2018-12-04 Thread Elijah Newren
On Tue, Dec 4, 2018 at 6:26 PM Junio C Hamano wrote: > > Duy Nguyen writes: > > > On Tue, Dec 4, 2018 at 6:43 PM Elijah Newren wrote: > >> > > > +--ours:: > >> > > > +--theirs:: > >> ... > >> go away. Maybe it can still be fixed (I haven't dug too deeply into > >> it), but if so, the only fix

Re: [PATCH v3 07/14] checkout: split into switch-branch and restore-files

2018-12-04 Thread Elijah Newren
On Tue, Dec 4, 2018 at 6:14 PM Junio C Hamano wrote: > > Duy Nguyen writes: > > >> My single biggest worry about this whole series is that I'm worried > >> you're perpetuating and even further ingraining one of the biggest > >> usability problems with checkout: people suggest and use it for > >>

Re: [PATCH v3 07/14] checkout: split into switch-branch and restore-files

2018-12-04 Thread Junio C Hamano
Duy Nguyen writes: > On Tue, Dec 4, 2018 at 6:43 PM Elijah Newren wrote: >> > > > +--ours:: >> > > > +--theirs:: >> ... >> go away. Maybe it can still be fixed (I haven't dug too deeply into >> it), but if so, the only fix needed here would be to remove this long >> explanation about why the

Re: [PATCH v3 07/14] checkout: split into switch-branch and restore-files

2018-12-04 Thread Junio C Hamano
Duy Nguyen writes: >> My single biggest worry about this whole series is that I'm worried >> you're perpetuating and even further ingraining one of the biggest >> usability problems with checkout: people suggest and use it for >> reverting/restoring paths to a previous version, but it doesn't do

Re: [PATCH v3 07/14] checkout: split into switch-branch and restore-files

2018-12-04 Thread Duy Nguyen
On Tue, Dec 4, 2018 at 6:43 PM Elijah Newren wrote: > > > > +--ours:: > > > > +--theirs:: > > > > + Check out stage #2 ('ours') or #3 ('theirs') for unmerged > > > > + paths. > > > > ++ > > > > +Note that during `git rebase` and `git pull --rebase`, 'ours' and > > > > +'theirs' may

Re: [PATCH v3 07/14] checkout: split into switch-branch and restore-files

2018-12-04 Thread Elijah Newren
On Tue, Dec 4, 2018 at 8:22 AM Duy Nguyen wrote: > > Thanks for all the comments! There are still some I haven't replied > (either I'll agree and do it anyway, or I'll need some more time to > digest) > > On Tue, Dec 4, 2018 at 1:45 AM Elijah Newren wrote: > > > +'git restore-files' [--from=]

Re: [PATCH v3 07/14] checkout: split into switch-branch and restore-files

2018-12-04 Thread Duy Nguyen
Thanks for all the comments! There are still some I haven't replied (either I'll agree and do it anyway, or I'll need some more time to digest) On Tue, Dec 4, 2018 at 1:45 AM Elijah Newren wrote: > > +'git restore-files' [--from=] ... > > Isn't this already inferred by the previous line? Or was

Re: [PATCH v3 07/14] checkout: split into switch-branch and restore-files

2018-12-03 Thread Junio C Hamano
Elijah Newren writes: >> +Updates files in the working tree to match the version in the index >> +or the specified tree. >> + >> +'git restore-files' [--from=] ...:: > > and ? I understand and , > or but have no clue why it'd be okay to specify > and together. What does that even mean? I

Re: [PATCH v3 07/14] checkout: split into switch-branch and restore-files

2018-12-03 Thread Elijah Newren
On Thu, Nov 29, 2018 at 2:03 PM Nguyễn Thái Ngọc Duy wrote: > > "git checkout" doing too many things is a source of confusion for many > users (and it even bites old timers sometimes). To rememdy that, the > command is now split in two: switch-branch and checkout-files. The "checkout-files"

[PATCH v3 07/14] checkout: split into switch-branch and restore-files

2018-11-29 Thread Nguyễn Thái Ngọc Duy
"git checkout" doing too many things is a source of confusion for many users (and it even bites old timers sometimes). To rememdy that, the command is now split in two: switch-branch and checkout-files. The good old "git checkout" command is still here and will be until all (or most of users) are