Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
764b9e71
Commit
764b9e71
authored
Jan 28, 2013
by
Vicent Martí
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1289 from jwiegley/development
Added git_treebuilder_entrycount
parents
96447d24
5fb98206
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
include/git2/tree.h
+8
-0
src/tree.c
+6
-0
No files found.
include/git2/tree.h
View file @
764b9e71
...
@@ -259,6 +259,14 @@ GIT_EXTERN(int) git_treebuilder_create(
...
@@ -259,6 +259,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
*
*
* This will clear all the entries and free to builder.
* This will clear all the entries and free to builder.
...
...
src/tree.c
View file @
764b9e71
...
@@ -340,6 +340,12 @@ size_t git_tree_entrycount(const git_tree *tree)
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment