Skip to content
  • Junio C Hamano's avatar
    rerere: split conflict ID further · 1869bbe1
    Junio C Hamano authored
    
    
    The plan is to keep assigning the backward compatible conflict ID
    based on the hash of the (normalized) text of conflicts, keep using
    that conflict ID as the directory name under $GIT_DIR/rr-cache/, but
    allow each conflicted path to use a separate "variant" to record
    resolutions, i.e. having more than one <preimage,postimage> pairs
    under $GIT_DIR/rr-cache/$ID/ directory.  As the first step in that
    direction, separate the shared "conflict ID" out of the rerere_id
    structure.
    
    The plan is to keep information per $ID in rerere_dir, that can be
    shared among rerere_id that is per conflicted path.
    
    When we are done with rerere(), which can be directly called from
    other programs like "git apply", "git commit" and "git merge", the
    shared rerere_dir structures can be freed entirely, so they are not
    reference-counted and they are not freed when we release rerere_id's
    that reference them.
    
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    1869bbe1