summaryrefslogtreecommitdiff
path: root/src/libgit2/tree-cache.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libgit2/tree-cache.h')
-rw-r--r--src/libgit2/tree-cache.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libgit2/tree-cache.h b/src/libgit2/tree-cache.h
index a27e30466..e4a73f277 100644
--- a/src/libgit2/tree-cache.h
+++ b/src/libgit2/tree-cache.h
@@ -18,6 +18,8 @@ typedef struct git_tree_cache {
struct git_tree_cache **children;
size_t children_count;
+ git_oid_t oid_type;
+
ssize_t entry_count;
git_oid oid;
size_t namelen;
@@ -25,14 +27,14 @@ typedef struct git_tree_cache {
} git_tree_cache;
int git_tree_cache_write(git_str *out, git_tree_cache *tree);
-int git_tree_cache_read(git_tree_cache **tree, const char *buffer, size_t buffer_size, git_pool *pool);
+int git_tree_cache_read(git_tree_cache **tree, const char *buffer, size_t buffer_size, git_oid_t oid_type, git_pool *pool);
void git_tree_cache_invalidate_path(git_tree_cache *tree, const char *path);
const git_tree_cache *git_tree_cache_get(const git_tree_cache *tree, const char *path);
-int git_tree_cache_new(git_tree_cache **out, const char *name, git_pool *pool);
+int git_tree_cache_new(git_tree_cache **out, const char *name, git_oid_t oid_type, git_pool *pool);
/**
* Read a tree as the root of the tree cache (like for `git read-tree`)
*/
-int git_tree_cache_read_tree(git_tree_cache **out, const git_tree *tree, git_pool *pool);
+int git_tree_cache_read_tree(git_tree_cache **out, const git_tree *tree, git_oid_t oid_type, git_pool *pool);
void git_tree_cache_free(git_tree_cache *tree);
#endif