• J
    checkout -m: attempt merge when deletion of path was staged · 6a143aa2
    Jonathan Nieder 提交于
    twoway_merge() is missing an o->gently check in the case where a file
    that needs to be modified is missing from the index but present in the
    old and new trees.  As a result, in this case 'git checkout -m' errors
    out instead of trying to perform a merge.
    
    Fix it by checking o->gently.  While at it, inline the o->gently check
    into reject_merge to prevent future call sites from making the same
    mistake.
    
    Noticed by code inspection.  The test for the motivating case was
    added by JC.
    Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    6a143aa2
unpack-trees.c 47.9 KB