]> git.ipfire.org Git - thirdparty/git.git/commit - rerere.c
rerere: split conflict ID further
authorJunio C Hamano <gitster@pobox.com>
Thu, 16 Jul 2015 21:50:05 +0000 (14:50 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 8 Feb 2016 23:01:15 +0000 (15:01 -0800)
commit1869bbe1ce28d2b8024d5fac4267c0428483e6fb
treef44a516158ecaedd56883b6d189fc35d2c5920d7
parentf58316db0ef1b25506c8cd6cc86b3071243a672a
rerere: split conflict ID further

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