From 1b000ea460d6a37a0719f86e4d965ddf3ece0598 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Sat, 18 Mar 2017 15:14:27 +0100 Subject: Call necessary libgit init and shutdown functions. The library asserts otherwise --- tests/hawd/state.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/hawd/state.cpp b/tests/hawd/state.cpp index dbfe019..dfeef41 100644 --- a/tests/hawd/state.cpp +++ b/tests/hawd/state.cpp @@ -116,6 +116,7 @@ const char *State::commitHash() const void State::findGitHash() { #ifdef HAVE_LIBGIT2 + git_libgit2_init(); git_buf root = {0}; int error = git_repository_discover(&root, projectPath().toStdString().data(), 0, NULL); if (!error) { @@ -133,6 +134,7 @@ void State::findGitHash() git_repository_free(repo); } git_buf_free(&root); + git_libgit2_shutdown(); #endif } -- cgit v1.2.3