diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2020-07-11 12:25:51 +0100 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2020-10-11 20:13:06 +0100 |
| commit | 1ec4702a51b1074fb7109a841dc95a192feb8525 (patch) | |
| tree | e02df14e26409fe908baa191ba459b35ab70b849 /src/libgit2.c | |
| parent | e316b0d3d64eb8f65f4109c1565d929b29e1d33a (diff) | |
| download | libgit2-1ec4702a51b1074fb7109a841dc95a192feb8525.tar.gz | |
Rename global.c to libgit2.c
Now that we've identified that our global settings really aren't global
at all, and refactored the library to match that, change global.c to
libgit2.c, which is especially nice since the prefix of the functions
matches the filename.
Diffstat (limited to 'src/libgit2.c')
| -rw-r--r-- | src/libgit2.c | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/libgit2.c b/src/libgit2.c new file mode 100644 index 000000000..e6b7f46f0 --- /dev/null +++ b/src/libgit2.c @@ -0,0 +1,52 @@ +/* + * Copyright (C) the libgit2 contributors. All rights reserved. + * + * This file is part of libgit2, distributed under the GNU GPL v2 with + * a Linking Exception. For full terms see the included COPYING file. + */ + +#include "runtime.h" + +#include "alloc.h" +#include "threadstate.h" +#include "hash.h" +#include "sysdir.h" +#include "filter.h" +#include "settings.h" +#include "mwindow.h" +#include "merge_driver.h" +#include "pool.h" +#include "streams/registry.h" +#include "streams/mbedtls.h" +#include "streams/openssl.h" +#include "thread-utils.h" +#include "git2/global.h" +#include "transports/ssh.h" +#include "win32/w32_stack.h" + +int git_libgit2_init(void) +{ + static git_runtime_init_fn init_fns[] = { + git_allocator_global_init, + git_threadstate_global_init, + git_threads_global_init, + git_hash_global_init, + git_sysdir_global_init, + git_filter_global_init, + git_merge_driver_global_init, + git_transport_ssh_global_init, + git_stream_registry_global_init, + git_openssl_stream_global_init, + git_mbedtls_stream_global_init, + git_mwindow_global_init, + git_pool_global_init, + git_settings_global_init + }; + + return git_runtime_init(init_fns, ARRAY_SIZE(init_fns)); +} + +int git_libgit2_shutdown(void) +{ + return git_runtime_shutdown(); +} |
