From 88db867437be96e3be1669084bd984babfab2a06 Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Sun, 13 Jun 2021 19:14:36 -0400 Subject: Added `cleanup_git()`. This function cleans up the initialized git state. --- git.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/git.c b/git.c index 65a5c62..5e86642 100644 --- a/git.c +++ b/git.c @@ -55,6 +55,11 @@ void cleanup_git_repos(git_repository **repos) { free(repos); } +void cleanup_git(git_repository **repos) { + cleanup_git_repos(repos); + git_libgit2_shutdown(); +} + git_repository **init_git(config *cfg) { git_repository **repos = NULL; git_repository *repo = NULL; -- cgit v1.2.3-13-gbd6f