diff options
author | Vicent Marti <tanoku@gmail.com> | 2012-11-01 20:28:28 +0100 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2012-11-01 20:28:28 +0100 |
commit | 1e808f9cda598fef83ff93deb007212ebf61be6d (patch) | |
tree | ed40a431c2884cb87ea489640e4217463df9e325 /include/git2/index.h | |
parent | 43eeca04a7fe00332fe8c4723e29fa82a5304b13 (diff) | |
download | libgit2-index-open-cleanup.tar.gz |
index: Add `git_index_new`index-open-cleanup
Diffstat (limited to 'include/git2/index.h')
-rw-r--r-- | include/git2/index.h | 13 |
1 files changed, 13 insertions, 0 deletions
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 @@ -126,6 +126,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. * * @param index an existing index object |