summaryrefslogtreecommitdiff
path: root/object-store.h
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-03-23 17:20:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-03-23 18:06:01 (GMT)
commit90c62155d65a6bec5c2c293c8ece0b22173f63a3 (patch)
treec4d23c9cae65059849f5e1d39814f3eb34657120 /object-store.h
parent00a3da2a131a3e122df7e053d992fbc1735bf4f9 (diff)
downloadgit-90c62155d65a6bec5c2c293c8ece0b22173f63a3.zip
git-90c62155d65a6bec5c2c293c8ece0b22173f63a3.tar.gz
git-90c62155d65a6bec5c2c293c8ece0b22173f63a3.tar.bz2
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 <sbeller@google.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'object-store.h')
-rw-r--r--object-store.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/object-store.h b/object-store.h
new file mode 100644
index 0000000..abfaae0
--- /dev/null
+++ b/object-store.h
@@ -0,0 +1,18 @@
+#ifndef OBJECT_STORE_H
+#define OBJECT_STORE_H
+
+struct raw_object_store {
+ /*
+ * Path to the repository's object store.
+ * Cannot be NULL after initialization.
+ */
+ char *objectdir;
+
+ /* Path to extra alternate object database if not NULL */
+ char *alternate_db;
+};
+
+struct raw_object_store *raw_object_store_new(void);
+void raw_object_store_clear(struct raw_object_store *o);
+
+#endif /* OBJECT_STORE_H */