summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2013-04-24 15:52:33 +0200
committerVicent Marti <tanoku@gmail.com>2013-04-24 15:52:58 +0200
commit879458e7cf87374241da300a864493761bf48e7c (patch)
treeebc4c7b0d2fb6b4336049c31a7f5a3c00aeef235 /include/git2
parent2370b4d79e22663c956d49026950fd1719a6cf98 (diff)
downloadlibgit2-879458e7cf87374241da300a864493761bf48e7c.tar.gz
repo: Add `git_repository__cleanup`
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/sys/repository.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/git2/sys/repository.h b/include/git2/sys/repository.h
index 34bc17516..ba3d65ae5 100644
--- a/include/git2/sys/repository.h
+++ b/include/git2/sys/repository.h
@@ -27,6 +27,20 @@ GIT_BEGIN_DECL
*/
GIT_EXTERN(int) git_repository_new(git_repository **out);
+
+/**
+ * Reset all the internal state in a repository.
+ *
+ * This will free all the mapped memory and internal objects
+ * of the repository and leave it in a "blank" state.
+ *
+ * There's no need to call this function directly unless you're
+ * trying to aggressively cleanup the repo before its
+ * deallocation. `git_repository_free` already performs this operation
+ * before deallocation the repo.
+ */
+GIT_EXTERN(void) git_repository__cleanup(git_repository *repo);
+
/**
* Set the configuration file for this repository
*