summaryrefslogtreecommitdiff
path: root/git.c
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2021-06-13 19:14:36 -0400
committermrb0nk500 <b0nk@b0nk.xyz>2021-06-13 19:14:36 -0400
commit88db867437be96e3be1669084bd984babfab2a06 (patch)
tree460b2c51e0387e0fd64a82e842ed8fbb99f20dbc /git.c
parent42a0d5feb50e4988a9f19bbfa9aaca9e52f35608 (diff)
Added `cleanup_git()`.
This function cleans up the initialized git state.
Diffstat (limited to 'git.c')
-rw-r--r--git.c5
1 files changed, 5 insertions, 0 deletions
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;