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
0be42199
Commit
0be42199
authored
Nov 10, 2010
by
Scott Chacon
Committed by
Vicent Marti
Nov 11, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
accessor for index entry count
parent
69f0295c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
src/git/index.h
+8
-0
src/index.c
+6
-0
No files found.
src/git/index.h
View file @
0be42199
...
@@ -147,6 +147,14 @@ GIT_EXTERN(int) git_index_add(git_index *index, const git_index_entry *source_en
...
@@ -147,6 +147,14 @@ GIT_EXTERN(int) git_index_add(git_index *index, const git_index_entry *source_en
*/
*/
GIT_EXTERN
(
git_index_entry
*
)
git_index_get
(
git_index
*
index
,
int
n
);
GIT_EXTERN
(
git_index_entry
*
)
git_index_get
(
git_index
*
index
,
int
n
);
/**
* Get the count of entries currently in the index
*
* @param index an existing index object
* @return integer of count of current entries
*/
GIT_EXTERN
(
unsigned
int
)
git_index_entrycount
(
git_index
*
index
);
/** @} */
/** @} */
GIT_END_DECL
GIT_END_DECL
...
...
src/index.c
View file @
0be42199
...
@@ -221,6 +221,12 @@ int git_index_write(git_index *index)
...
@@ -221,6 +221,12 @@ int git_index_write(git_index *index)
return
0
;
return
0
;
}
}
unsigned
int
git_index_entrycount
(
git_index
*
index
)
{
assert
(
index
);
return
index
->
entry_count
;
}
git_index_entry
*
git_index_get
(
git_index
*
index
,
int
n
)
git_index_entry
*
git_index_get
(
git_index
*
index
,
int
n
)
{
{
assert
(
index
);
assert
(
index
);
...
...
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