summaryrefslogtreecommitdiff
path: root/examples/general.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/general.c')
-rw-r--r--examples/general.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/general.c b/examples/general.c
index 051d69380..8981cacab 100644
--- a/examples/general.c
+++ b/examples/general.c
@@ -59,6 +59,10 @@ static void check_error(int error_code, const char *action)
int main (int argc, char** argv)
{
+ // Initialize the library, this will set up any global state which libgit2 needs
+ // including threading and crypto
+ git_libgit2_init();
+
// ### Opening the Repository
// There are a couple of methods for opening a repository, this being the