From 1e808f9cda598fef83ff93deb007212ebf61be6d Mon Sep 17 00:00:00 2001 From: Vicent Marti Date: Thu, 1 Nov 2012 20:28:28 +0100 Subject: index: Add `git_index_new` --- include/git2/index.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include/git2/index.h') diff --git a/include/git2/index.h b/include/git2/index.h index 2a0b001ff..bca9791c5 100644 --- a/include/git2/index.h +++ b/include/git2/index.h @@ -125,6 +125,19 @@ enum { */ GIT_EXTERN(int) git_index_open(git_index **index, const char *index_path); +/** + * Create an in-memory index object. + * + * This index object cannot be read/written to the filesystem, + * but may be used to perform in-memory index operations. + * + * The index must be freed once it's no longer in use. + * + * @param index the pointer for the new index + * @return 0 or an error code + */ +GIT_EXTERN(int) git_index_new(git_index **index); + /** * Free an existing index object. * -- cgit v1.2.1