git-p4: better error reporting when p4 fails
[gitweb.git] / object-store.h
index f54bc0b951a6af5a082dd131d36a9bb53d6d1958..1ff862c7f93fbe793af21acc963ea0f7ea8f1623 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef OBJECT_STORE_H
 #define OBJECT_STORE_H
 
+#include "oidmap.h"
+
 struct alternate_object_database {
        struct alternate_object_database *next;
 
@@ -93,6 +95,12 @@ struct raw_object_store {
        struct alternate_object_database *alt_odb_list;
        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
         *
@@ -121,4 +129,12 @@ struct raw_object_store {
 struct raw_object_store *raw_object_store_new(void);
 void raw_object_store_clear(struct raw_object_store *o);
 
+/*
+ * Put in `buf` the name of the file in the local object database that
+ * would be used to store a loose object with the specified sha1.
+ */
+void sha1_file_name(struct repository *r, struct strbuf *buf, const unsigned char *sha1);
+
+void *map_sha1_file(struct repository *r, const unsigned char *sha1, unsigned long *size);
+
 #endif /* OBJECT_STORE_H */