[PATCH] Do not record unstaged deleted file upon recursive merge if file was moved outside of working tree with enabled sparse-checkout.

2016-09-12 Thread Mikhail Filippov
It's a very unexpected behaviour when a user sees a deleted file after a merge with enabled sparse-checkout. Moreover, when the user resolves merge conflicts and commits the changes with the command "git commit -am xxx", a repository can be broken because all the moved files will be deleted. Fin

Re: [PATCH] Do not record unstaged deleted file upon recursive merge if file was moved outside of working tree with enabled sparse-checkout.

2016-09-12 Thread Mikhail Filippov
>> +test_expect_success 'move file/sparse-checkout/merge should not delete >> moved file' ' >> + git rm -rf . && >> + git clean -fdqx && >> + rm -rf .git && >> + git init && > > Yuck. This is inherited from existing tests but I think they need > to be cleaned up. It is not your fault, and it

Re: [PATCH] Do not record unstaged deleted file upon recursive merge if file was moved outside of working tree with enabled sparse-checkout.

2016-09-12 Thread Mikhail Filippov
deleting. 12.09.2016, 02:24, "Junio C Hamano" : >    Mikhail Filippov writes: > >> --- > >    You'd need a lot more explanation on why this is needed >    (i.e. without it what behaviour you would get, and why that >    behaviour is wrong). > &

[PATCH] Do not record unstaged deleted file upon recursive merge if file was moved outside of working tree with enabled sparse-checkout.

2016-09-11 Thread Mikhail Filippov
--- merge-recursive.c| 9 +--- t/t6042-merge-rename-corner-cases.sh | 42 2 files changed, 48 insertions(+), 3 deletions(-) diff --git a/merge-recursive.c b/merge-recursive.c index e349126..25dc701 100644 --- a/merge-recursive.c +++ b/