]>
git.proxmox.com Git - libgit2.git/blob - src/tree-cache.h
a27e3046614539ef2a675fac9640a7d7b53289d5
2 * Copyright (C) the libgit2 contributors. All rights reserved.
4 * This file is part of libgit2, distributed under the GNU GPL v2 with
5 * a Linking Exception. For full terms see the included COPYING file.
8 #ifndef INCLUDE_tree_cache_h__
9 #define INCLUDE_tree_cache_h__
17 typedef struct git_tree_cache
{
18 struct git_tree_cache
**children
;
19 size_t children_count
;
24 char name
[GIT_FLEX_ARRAY
];
27 int git_tree_cache_write(git_str
*out
, git_tree_cache
*tree
);
28 int git_tree_cache_read(git_tree_cache
**tree
, const char *buffer
, size_t buffer_size
, git_pool
*pool
);
29 void git_tree_cache_invalidate_path(git_tree_cache
*tree
, const char *path
);
30 const git_tree_cache
*git_tree_cache_get(const git_tree_cache
*tree
, const char *path
);
31 int git_tree_cache_new(git_tree_cache
**out
, const char *name
, git_pool
*pool
);
33 * Read a tree as the root of the tree cache (like for `git read-tree`)
35 int git_tree_cache_read_tree(git_tree_cache
**out
, const git_tree
*tree
, git_pool
*pool
);
36 void git_tree_cache_free(git_tree_cache
*tree
);