Skip to content
  • Junio C Hamano's avatar
    rerere: split code to call ll_merge() further · 0ce02b36
    Junio C Hamano authored
    
    
    The merge() helper function is given an existing rerere ID (i.e. the
    name of the .git/rr-cache/* subdirectory, and the variant number)
    that identifies one <preimage, postimage> pair, try to see if the
    conflicted state in the given path can be resolved by using the pair,
    and if this succeeds, then update the conflicted path with the
    result in the working tree.
    
    To implement rerere_forget() in the multiple variant world, we'd
    need a helper to do the "see if a <preimage, postimage> pair cleanly
    resolves a conflicted state we have in-core" part, without actually
    touching any file in the working tree, in order to identify which
    variant(s) to remove.  Split the logic to do so into a separate
    helper function try_merge() out of merge().
    
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    0ce02b36