Re: [PATCH 4/6] apply: make sure check_preimage() does not leave empty file on error

2015-12-28 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > diff --git a/t/t2203-add-intent.sh b/t/t2203-add-intent.sh > index bb5ef2b..96c8755 100755 > --- a/t/t2203-add-intent.sh > +++ b/t/t2203-add-intent.sh > @@ -95,5 +95,21 @@ test_expect_success 'apply adds new file on i-t-a entry' ' > ) > '

[PATCH 4/6] apply: make sure check_preimage() does not leave empty file on error

2015-12-26 Thread Nguyễn Thái Ngọc Duy
The test case probably describes the test scenario the best. We have a patch to modify some file but the base file is gone. Because check_preimage() finds an index entry with the same old_name, it tries to restore the on-disk base file with cached content with checkout_target() and move on. If