summaryrefslogtreecommitdiff
path: root/src/git
diff options
context:
space:
mode:
authorScott Chacon <schacon@gmail.com>2010-11-10 13:43:55 -0800
committerVicent Marti <tanoku@gmail.com>2010-11-11 03:28:46 +0200
commit0be421994e34e2d8e200f15b64894dd0c09c4eec (patch)
treef84cfe2a38286895c1b129e6d2bf1ae54acf7f33 /src/git
parent69f0295c8031c6bb4ecc56a605070969513616d1 (diff)
downloadlibgit2-0be421994e34e2d8e200f15b64894dd0c09c4eec.tar.gz
accessor for index entry count
Diffstat (limited to 'src/git')
-rw-r--r--src/git/index.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/git/index.h b/src/git/index.h
index bdfb7e192..8220e6290 100644
--- a/src/git/index.h
+++ b/src/git/index.h
@@ -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);
+/**
+ * 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