]> git.proxmox.com Git - libgit2.git/blob - src/tree-cache.h
Merge pull request #557 from schu/copyright
[libgit2.git] / src / tree-cache.h
1 /*
2 * Copyright (C) 2009-2012 the libgit2 contributors
3 *
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.
6 */
7
8 #ifndef INCLUDE_tree_cache_h__
9 #define INCLUDE_tree_cache_h__
10
11 #include "common.h"
12 #include "git2/oid.h"
13
14 struct git_tree_cache {
15 struct git_tree_cache *parent;
16 struct git_tree_cache **children;
17 size_t children_count;
18
19 ssize_t entries;
20 git_oid oid;
21 char name[GIT_FLEX_ARRAY];
22 };
23
24 typedef struct git_tree_cache git_tree_cache;
25
26 int git_tree_cache_read(git_tree_cache **tree, const char *buffer, size_t buffer_size);
27 void git_tree_cache_invalidate_path(git_tree_cache *tree, const char *path);
28 const git_tree_cache *git_tree_cache_get(const git_tree_cache *tree, const char *path);
29 void git_tree_cache_free(git_tree_cache *tree);
30
31 #endif