summaryrefslogtreecommitdiff
path: root/examples/general.c
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2014-10-23 17:34:41 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2014-11-07 21:36:40 +0100
commitbc540ff79173b3182206db5eb322048626b81119 (patch)
tree4b2cb3c08f07ff7062dc1a033b4554a79bd418b8 /examples/general.c
parent4e1b3b3b7186b017223b8302a51289ff92ccba25 (diff)
downloadlibgit2-cmn/global-init.tar.gz
Rename git_threads_ to git_libgit2_cmn/global-init
This describes their purpose better, as we now initialize ssl and some other global stuff in there. Calling the init function is not something which has been optional for a while now.
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