Commit 764b9e71 by Vicent Martí

Merge pull request #1289 from jwiegley/development

Added git_treebuilder_entrycount
parents 96447d24 5fb98206
......@@ -259,6 +259,14 @@ GIT_EXTERN(int) git_treebuilder_create(
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
*
* This will clear all the entries and free to builder.
......
......@@ -340,6 +340,12 @@ size_t git_tree_entrycount(const git_tree *tree)
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)
{
if (path)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment