Skip to content
  • Elijah Newren's avatar
    merge-recursive: handle addition of submodule on our side of history · c641ca67
    Elijah Newren authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    The code for a newly added path assumed that the path was a normal file,
    and thus checked for there being a directory still being in the way of
    the file.  Note that since unpack_trees() does path-in-the-way checks
    already, the only way for there to be a directory in the way at this
    point in the code, is if there is some kind of D/F conflict in the merge.
    
    For a submodule addition on HEAD's side of history, the submodule would
    have already been present.  This means that we do expect there to be a
    directory present but should not consider it to be "in the way"; instead,
    it's the expected submodule.  So, when there's a submodule addition from
    HEAD's side, don't bother checking the working copy for a directory in
    the way.
    
    Signed-off-by: default avatarElijah Newren <newren@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    c641ca67