• E
    merge-recursive: fix rename/add conflict handling · 7f867165
    Elijah Newren 提交于
    This makes the rename/add conflict handling make use of the new
    handle_file_collision() function, which fixes several bugs and improves
    things for the rename/add case significantly.  Previously, rename/add
    would:
    
      * Not leave any higher order stage entries in the index, making it
        appear as if there were no conflict.
      * Would place the rename file at the colliding path, and move the
        added file elsewhere, which combined with the lack of higher order
        stage entries felt really odd.  It's not clear to me why the
        rename should take precedence over the add; if one should be moved
        out of the way, they both probably should.
      * In the recursive case, it would do a two way merge of the added
        file and the version of the renamed file on the renamed side,
        completely excluding modifications to the renamed file on the
        unrenamed side of history.
    
    Use the new handle_file_collision() to fix all of these issues.
    Signed-off-by: NElijah Newren <newren@gmail.com>
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    7f867165
merge-recursive.c 110.6 KB