From 879458e7cf87374241da300a864493761bf48e7c Mon Sep 17 00:00:00 2001 From: Vicent Marti Date: Wed, 24 Apr 2013 15:52:33 +0200 Subject: repo: Add `git_repository__cleanup` --- include/git2/sys/repository.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'include/git2') 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 * -- cgit v1.2.1