summaryrefslogtreecommitdiff
path: root/object-store.h
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-04-12 00:21:05 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-04-12 02:38:56 (GMT)
commitd88f9fdf8b2ccf65993bb977094ab9b2249635ee (patch)
treef3375d0cd21b83cce26f95557edf89c52438dd23 /object-store.h
parentf37b9bc00ca3cb9a22c4d5da564eb271ba13c109 (diff)
downloadgit-d88f9fdf8b2ccf65993bb977094ab9b2249635ee.zip
git-d88f9fdf8b2ccf65993bb977094ab9b2249635ee.tar.gz
git-d88f9fdf8b2ccf65993bb977094ab9b2249635ee.tar.bz2
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>
Diffstat (limited to 'object-store.h')
-rw-r--r--object-store.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/object-store.h b/object-store.h
index fef33f3..c04b4c9 100644
--- a/object-store.h
+++ b/object-store.h
@@ -1,6 +1,8 @@
#ifndef OBJECT_STORE_H
#define OBJECT_STORE_H
+#include "oidmap.h"
+
struct alternate_object_database {
struct alternate_object_database *next;
@@ -94,6 +96,12 @@ struct raw_object_store {
struct alternate_object_database **alt_odb_tail;
/*
+ * Objects that should be substituted by other objects
+ * (see git-replace(1)).
+ */
+ struct oidmap replace_map;
+
+ /*
* private data
*
* should only be accessed directly by packfile.c