Re: [PATCH 5/8] checkout: introduce --{,no-}overlay option

2018-12-11 Thread Thomas Gummerer
On 12/10, Duy Nguyen wrote: > On Sun, Dec 9, 2018 at 9:05 PM Thomas Gummerer wrote: > > @@ -302,15 +310,29 @@ static int checkout_paths(const struct checkout_opts > > *opts, > > ce->ce_flags &= ~CE_MATCHED; > > if (!opts->ignore_skipworktree && ce_skip_worktree(ce)

Re: [PATCH 5/8] checkout: introduce --{,no-}overlay option

2018-12-11 Thread Thomas Gummerer
On 12/11, Junio C Hamano wrote: > Elijah Newren writes: > > >> Note that 'git checkout -p -- []' already works > >> this way, so no changes are needed for the patch mode. We disallow > >> 'git checkout --overlay -p' to avoid confusing users who would expect > >> to be able to force overlay mode

Re: [PATCH 5/8] checkout: introduce --{,no-}overlay option

2018-12-10 Thread Elijah Newren
On Mon, Dec 10, 2018 at 7:07 PM Junio C Hamano wrote: > > Elijah Newren writes: > > >> Note that 'git checkout -p -- []' already works > >> this way, so no changes are needed for the patch mode. We disallow > >> 'git checkout --overlay -p' to avoid confusing users who would expect > >> to be ab

Re: [PATCH 5/8] checkout: introduce --{,no-}overlay option

2018-12-10 Thread Junio C Hamano
Elijah Newren writes: >> Note that 'git checkout -p -- []' already works >> this way, so no changes are needed for the patch mode. We disallow >> 'git checkout --overlay -p' to avoid confusing users who would expect >> to be able to force overlay mode in 'git checkout -p' this way. > > Whoa...t

Re: [PATCH 5/8] checkout: introduce --{,no-}overlay option

2018-12-10 Thread Elijah Newren
On Sun, Dec 9, 2018 at 12:05 PM Thomas Gummerer wrote: > > Currently 'git checkout' is defined as an overlay operation, which > means that if in 'git checkout -- []' we have an > entry in the index that matches , but that doesn't exist in > , that entry will not be removed from the index or the >

Re: [PATCH 5/8] checkout: introduce --{,no-}overlay option

2018-12-10 Thread Duy Nguyen
On Sun, Dec 9, 2018 at 9:05 PM Thomas Gummerer wrote: > @@ -302,15 +310,29 @@ static int checkout_paths(const struct checkout_opts > *opts, > ce->ce_flags &= ~CE_MATCHED; > if (!opts->ignore_skipworktree && ce_skip_worktree(ce)) > continue;

[PATCH 5/8] checkout: introduce --{,no-}overlay option

2018-12-09 Thread Thomas Gummerer
Currently 'git checkout' is defined as an overlay operation, which means that if in 'git checkout -- []' we have an entry in the index that matches , but that doesn't exist in , that entry will not be removed from the index or the working tree. Introduce a new --{,no-}overlay option, which allows