• E
    merge-recursive: increase marker length with depth of recursion · b2a7942b
    Elijah Newren 提交于
    Later patches in this series will modify file collision conflict
    handling (e.g. from rename/add and rename/rename(2to1) conflicts) so
    that multiply nested conflict markers can arise even before considering
    conflicts in the virtual merge base.  Including the virtual merge base
    will provide a way to get triply (or higher) nested conflict markers.
    This new way to get nested conflict markers will force the need for a
    more general mechanism to extend the length of conflict markers in order
    to differentiate between different nestings.
    
    Along with this change to conflict marker length handling, we want to
    make sure that we don't regress handling for other types of conflicts
    with nested conflict markers.  Add a more involved testcase using
    merge.conflictstyle=diff3, where not only does the virtual merge base
    contain conflicts, but its virtual merge base does as well (i.e. a case
    with triply nested conflict markers).  While there are multiple
    reasonable ways to handle nested conflict markers in the virtual merge
    base for this type of situation, the easiest approach that dovetails
    well with the new needs for the file collision conflict handling is to
    require that the length of the conflict markers increase with each
    subsequent nesting.
    
    Subsequent patches which change the rename/add and rename/rename(2to1)
    conflict handling will modify the extra_marker_size flag appropriately
    for their new needs.
    Signed-off-by: NElijah Newren <newren@gmail.com>
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    b2a7942b
merge-recursive.c 105.7 KB