libgit2

git_repository__cleanup

Version:

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 deallocating the repo.

Signature

int git_repository__cleanup(git_repository *repo);

Parameters

In
repo

The repository to clean up

Returns

int

0 on success, or an error code

Versions