mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-29 19:04:05 +00:00
Merge pull request #1289 from jwiegley/development
Added git_treebuilder_entrycount
This commit is contained in:
commit
764b9e7146
@ -258,6 +258,14 @@ GIT_EXTERN(int) git_treebuilder_create(
|
|||||||
*/
|
*/
|
||||||
GIT_EXTERN(void) git_treebuilder_clear(git_treebuilder *bld);
|
GIT_EXTERN(void) git_treebuilder_clear(git_treebuilder *bld);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the number of entries listed in a treebuilder
|
||||||
|
*
|
||||||
|
* @param tree a previously loaded treebuilder.
|
||||||
|
* @return the number of entries in the treebuilder
|
||||||
|
*/
|
||||||
|
GIT_EXTERN(unsigned int) git_treebuilder_entrycount(git_treebuilder *bld);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Free a tree builder
|
* Free a tree builder
|
||||||
*
|
*
|
||||||
|
@ -340,6 +340,12 @@ size_t git_tree_entrycount(const git_tree *tree)
|
|||||||
return tree->entries.length;
|
return tree->entries.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsigned int git_treebuilder_entrycount(git_treebuilder *bld)
|
||||||
|
{
|
||||||
|
assert(bld);
|
||||||
|
return bld->entries.length;
|
||||||
|
}
|
||||||
|
|
||||||
static int tree_error(const char *str, const char *path)
|
static int tree_error(const char *str, const char *path)
|
||||||
{
|
{
|
||||||
if (path)
|
if (path)
|
||||||
|
Loading…
Reference in New Issue
Block a user