]> git.ipfire.org Git - thirdparty/git.git/blobdiff - object-store-ll.h
cache: add a function to read an OID of a specific algorithm
[thirdparty/git.git] / object-store-ll.h
index e8f22cdb1b585be9189482d090f168954580dcb9..c5f2bb2fc2fe6eb36cafa559b038dcd3095395da 100644 (file)
@@ -26,6 +26,9 @@ struct object_directory {
        uint32_t loose_objects_subdir_seen[8]; /* 256 bits */
        struct oidtree *loose_objects_cache;
 
+       /* Map between object IDs for loose objects. */
+       struct loose_object_map *loose_map;
+
        /*
         * This is a temporary object store created by the tmp_objdir
         * facility. Disable ref updates since the objects in the store
@@ -106,7 +109,7 @@ struct packed_git {
        const void *index_data;
        size_t index_size;
        uint32_t num_objects;
-       uint32_t crc_offset;
+       size_t crc_offset;
        struct oidset bad_objects;
        int index_version;
        time_t mtime;
@@ -252,11 +255,11 @@ void hash_object_file(const struct git_hash_algo *algo, const void *buf,
 
 int write_object_file_flags(const void *buf, unsigned long len,
                            enum object_type type, struct object_id *oid,
-                           unsigned flags);
+                           struct object_id *comapt_oid_in, unsigned flags);
 static inline int write_object_file(const void *buf, unsigned long len,
                                    enum object_type type, struct object_id *oid)
 {
-       return write_object_file_flags(buf, len, type, oid, 0);
+       return write_object_file_flags(buf, len, type, oid, NULL, 0);
 }
 
 int write_object_file_literally(const void *buf, unsigned long len,