Re: [PATCH] unpack-trees: do not fail reset because of unmerged skipped entry

2018-07-11 Thread Junio C Hamano
Duy Nguyen writes: > On Tue, Jul 10, 2018 at 9:22 PM Max Kirillov wrote: >> >> On Sat, Jun 16, 2018 at 07:14:44AM +0200, Duy Nguyen wrote: >> > -- 8< -- >> > diff --git a/unpack-trees.c b/unpack-trees.c >> > index 3a85a02a77..eb544ee1b3 100644 >> > --- a/unpack-trees.c >> > +++ b/unpack-trees.c

Re: [PATCH] unpack-trees: do not fail reset because of unmerged skipped entry

2018-07-11 Thread Duy Nguyen
On Tue, Jul 10, 2018 at 9:22 PM Max Kirillov wrote: > > On Sat, Jun 16, 2018 at 07:14:44AM +0200, Duy Nguyen wrote: > > -- 8< -- > > diff --git a/unpack-trees.c b/unpack-trees.c > > index 3a85a02a77..eb544ee1b3 100644 > > --- a/unpack-trees.c > > +++ b/unpack-trees.c > > @@ -1246,7 +1246,7 @@

Re: [PATCH] unpack-trees: do not fail reset because of unmerged skipped entry

2018-07-10 Thread Max Kirillov
On Fri, Jun 15, 2018 at 12:58:40PM -0700, Junio C Hamano wrote: > Do we want to verify the state after the 'hard' reset succeeds as > well? Things like > > - all paths in the HEAD and all paths in the index are identical; > > - paths that do exist in the working tree are all identical to

Re: [PATCH] unpack-trees: do not fail reset because of unmerged skipped entry

2018-07-10 Thread Max Kirillov
On Sat, Jun 16, 2018 at 07:14:44AM +0200, Duy Nguyen wrote: > -- 8< -- > diff --git a/unpack-trees.c b/unpack-trees.c > index 3a85a02a77..eb544ee1b3 100644 > --- a/unpack-trees.c > +++ b/unpack-trees.c > @@ -1246,7 +1246,7 @@ static void mark_new_skip_worktree(struct exclude_list > *el, >

Re: [PATCH] unpack-trees: do not fail reset because of unmerged skipped entry

2018-06-16 Thread Max Kirillov
> I do not know offhand if "reset --merge" should force succeeding in such a case, but I agree that it is criminal to stop "reset --hard" with "not uptodate", as the whole point of "hard reset" is to get rid of the 'not up-to-date' modification. I originally had a fix just for "reset --hard". It

Re: [PATCH] unpack-trees: do not fail reset because of unmerged skipped entry

2018-06-15 Thread Duy Nguyen
On Fri, Jun 15, 2018 at 07:42:51AM +0300, Max Kirillov wrote: > After modify/delete merge conflict happens in a file skipped by sparse > checkout, "git reset --merge", which implements the "--abort" actions, and > "git reset --hard" fail with message "Entry * not uptodate. Cannot update > sparse

Re: [PATCH] unpack-trees: do not fail reset because of unmerged skipped entry

2018-06-15 Thread Junio C Hamano
Max Kirillov writes: > After modify/delete merge conflict happens in a file skipped by sparse > checkout, "git reset --merge", which implements the "--abort" actions, and > "git reset --hard" fail with message "Entry * not uptodate. Cannot update > sparse checkout." The reason is that the entry

[PATCH] unpack-trees: do not fail reset because of unmerged skipped entry

2018-06-14 Thread Max Kirillov
After modify/delete merge conflict happens in a file skipped by sparse checkout, "git reset --merge", which implements the "--abort" actions, and "git reset --hard" fail with message "Entry * not uptodate. Cannot update sparse checkout." The reason is that the entry is verified in