]>
git.proxmox.com Git - libgit2.git/blob - src/git/tree.h
1 #ifndef INCLUDE_git_tree_h__
2 #define INCLUDE_git_tree_h__
6 #include "repository.h"
10 * @brief Git tree parsing, loading routines
11 * @defgroup git_tree Git tree parsing, loading routines
17 /** Representation of a tree object. */
18 typedef struct git_tree git_tree
;
21 * Lookup a tree object from the repository.
22 * The generated tree object is owned by the revision
23 * repo and shall not be freed by the user.
25 * @param repo the repo to use when locating the tree.
26 * @param id identity of the tree to locate.
27 * @return the tree; NULL if the tree could not be created
29 GIT_EXTERN(git_tree
*) git_tree_lookup(git_repository
*repo
, const git_oid
*id
);
32 * Get the id of a tree.
33 * @param tree a previously loaded tree.
34 * @return object identity for the tree.
36 GIT_EXTERN(const git_oid
*) git_tree_id(git_tree
*tree
);