summaryrefslogtreecommitdiff
path: root/src/global.c
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-03-18 14:19:35 -0700
committerRussell Belfer <rb@github.com>2013-03-18 14:19:35 -0700
commit41954a49c12a72eda3b3fe02c2752f6831b5dbf9 (patch)
tree4b9cff17fbd7172efddde4dba8e1d2f6b31e0c45 /src/global.c
parent5540d9477ed143707435324e785336d254b12e47 (diff)
downloadlibgit2-41954a49c12a72eda3b3fe02c2752f6831b5dbf9.tar.gz
Switch search paths to classic delimited strings
This switches the APIs for setting and getting the global/system search paths from using git_strarray to using a simple string with GIT_PATH_LIST_SEPARATOR delimited paths, just as the environment PATH variable would contain. This makes it simpler to get and set the value. I also added code to expand "$PATH" when setting a new value to embed the old value of the path. This means that I no longer require separate actions to PREPEND to the value.
Diffstat (limited to 'src/global.c')
-rw-r--r--src/global.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/global.c b/src/global.c
index 4d37fa1d2..b7fd8e257 100644
--- a/src/global.c
+++ b/src/global.c
@@ -7,7 +7,8 @@
#include "common.h"
#include "global.h"
#include "hash.h"
-#include "git2/threads.h"
+#include "fileops.h"
+#include "git2/threads.h"
#include "thread-utils.h"
@@ -82,6 +83,7 @@ void git_threads_shutdown(void)
/* Shut down any subsystems that have global state */
git_hash_global_shutdown();
+ git_futils_dirs_free();
}
git_global_st *git__global_state(void)
@@ -139,6 +141,7 @@ void git_threads_shutdown(void)
/* Shut down any subsystems that have global state */
git_hash_global_shutdown();
+ git_futils_dirs_free();
}
git_global_st *git__global_state(void)
@@ -171,7 +174,9 @@ int git_threads_init(void)
void git_threads_shutdown(void)
{
- /* noop */
+ /* Shut down any subsystems that have global state */
+ git_hash_global_shutdown();
+ git_futils_dirs_free();
}
git_global_st *git__global_state(void)