replace-object: move replace_map to object store

The relationship between an object X and another object Y that
replaces the object X is defined only within the scope of a
single repository.

The exception in reachability rule around these replacement objects
is also local to a repository (i.e. if traversal from refs reaches
X, then both X and Y are reachable and need to be kept from gc).

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Stefan Beller
2018-04-11 17:21:05 -07:00
committed by Junio C Hamano
parent f37b9bc00c
commit d88f9fdf8b
3 changed files with 24 additions and 10 deletions

9
replace-object.h Normal file
View File

@ -0,0 +1,9 @@
#ifndef REPLACE_OBJECT_H
#define REPLACE_OBJECT_H
struct replace_object {
struct oidmap_entry original;
struct object_id replacement;
};
#endif /* REPLACE_OBJECT_H */