mirror of
https://git.proxmox.com/git/libgit2
synced 2025-10-19 16:56:42 +00:00
accessor for index entry count
This commit is contained in:
parent
69f0295c80
commit
0be421994e
@ -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
|
||||||
|
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user