diff options
author | Carlos Martín Nieto <cmn@elego.de> | 2011-07-26 11:34:54 +0200 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2011-09-27 14:33:18 +0200 |
commit | b41713206b83bdf88522ae789b56630bb6e0a4bc (patch) | |
tree | bcc022a59fa7ca69c5d5473d1d243e35b4b3e0e7 /src/tree-cache.h | |
parent | 01d7fded1b233b6a8fcfeec4eaf00b7dc9cc7316 (diff) | |
download | libgit2-b41713206b83bdf88522ae789b56630bb6e0a4bc.tar.gz |
Move the tree cache functions to their own file
Rename git_index_tree to git_tree_cache.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Diffstat (limited to 'src/tree-cache.h')
-rw-r--r-- | src/tree-cache.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/tree-cache.h b/src/tree-cache.h new file mode 100644 index 000000000..a9e6d2dc7 --- /dev/null +++ b/src/tree-cache.h @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2009-2011 the libgit2 contributors + * + * This file is part of libgit2, distributed under the GNU GPL v2 with + * a Linking Exception. For full terms see the included COPYING file. + */ + +#ifndef INCLUDE_tree_cache_h__ +#define INCLUDE_tree_cache_h__ + +#include "common.h" +#include "git2/oid.h" + +struct git_tree_cache { + char *name; + + struct git_tree_cache *parent; + struct git_tree_cache **children; + size_t children_count; + + ssize_t entries; + git_oid oid; +}; + +typedef struct git_tree_cache git_tree_cache; + +int git_tree_cache_read(git_tree_cache **tree, const char *buffer, size_t buffer_size); +void git_tree_cache_free(git_tree_cache *tree); + +#endif |