From 1869bbe1ce28d2b8024d5fac4267c0428483e6fb Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 16 Jul 2015 14:50:05 -0700 Subject: 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 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 --- rerere.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'rerere.h') diff --git a/rerere.h b/rerere.h index ce545d0c04..faf5a2308d 100644 --- a/rerere.h +++ b/rerere.h @@ -15,8 +15,9 @@ struct pathspec; */ extern void *RERERE_RESOLVED; +struct rerere_dir; struct rerere_id { - char hex[41]; + struct rerere_dir *collection; }; extern int setup_rerere(struct string_list *, int); -- cgit v1.2.3