path: root/repository.h
diff options
authorStefan Beller <>2018-03-23 17:20:55 (GMT)
committerJunio C Hamano <>2018-03-23 18:06:01 (GMT)
commit90c62155d65a6bec5c2c293c8ece0b22173f63a3 (patch)
treec4d23c9cae65059849f5e1d39814f3eb34657120 /repository.h
parent00a3da2a131a3e122df7e053d992fbc1735bf4f9 (diff)
repository: introduce raw object store field
The raw object store field will contain any objects needed for access to objects in a given repository. This patch introduces the raw object store and populates it with the `objectdir`, which used to be part of the repository struct. As the struct gains members, we'll also populate the function to clear the memory for these members. In a later step, we'll introduce a struct object_parser, that will complement the object parsing in a repository struct: The raw object parser is the layer that will provide access to raw object content, while the higher level object parser code will parse raw objects and keeps track of parenthood and other object relationships using 'struct object'. For now only add the lower level to the repository struct. Signed-off-by: Stefan Beller <> Signed-off-by: Jonathan Nieder <> Signed-off-by: Nguyễn Thái Ngọc Duy <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'repository.h')
1 files changed, 4 insertions, 7 deletions
diff --git a/repository.h b/repository.h
index f21fd93..09df94a 100644
--- a/repository.h
+++ b/repository.h
@@ -2,9 +2,10 @@
struct config_set;
+struct git_hash_algo;
struct index_state;
+struct raw_object_store;
struct submodule_cache;
-struct git_hash_algo;
struct repository {
/* Environment */
@@ -21,13 +22,9 @@ struct repository {
char *commondir;
- * Path to the repository's object store.
- * Cannot be NULL after initialization.
+ * Holds any information related to accessing the raw object content.
- char *objectdir;
- /* Path to extra alternate object database if not NULL */
- char *alternate_db;
+ struct raw_object_store *objects;
* Path to the repository's graft file.