]> git.ipfire.org Git - thirdparty/git.git/commit - rerere.c
rerere: split code to call ll_merge() further
authorJunio C Hamano <gitster@pobox.com>
Fri, 11 Mar 2016 22:53:05 +0000 (14:53 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 6 Apr 2016 22:52:40 +0000 (15:52 -0700)
commit0ce02b362078efe3e3511feb55d2cb5f8e751961
tree1f376d19ad3a8db44acbb8748ff64669f09e1e28
parent3d730ed9b21b5397be7fa5bf89298122980b0f58
rerere: split code to call ll_merge() further

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: Junio C Hamano <gitster@pobox.com>
rerere.c