summaryrefslogtreecommitdiff
path: root/src/sysdir.h
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@github.com>2016-07-29 12:59:42 -0400
committerEdward Thomson <ethomson@github.com>2016-08-04 12:26:06 -0400
commit031d34b7e8dbfaeb05898e17ba71d0b156c898ec (patch)
tree140f2723c533699665f73956760bbbda0994aadf /src/sysdir.h
parent152efee20b74ea261cf8e05410a110687e17376e (diff)
downloadlibgit2-031d34b7e8dbfaeb05898e17ba71d0b156c898ec.tar.gz
sysdir: use the standard `init` patternethomson/paths_init
Don't try to determine when sysdirs are uninitialized. Instead, simply initialize them all at `git_libgit2_init` time and never try to reinitialize, except when consumers explicitly call `git_sysdir_set`. Looking at the buffer length is especially problematic, since there may no appropriate path for that value. (For example, the Windows-specific programdata directory has no value on non-Windows machines.) Previously we would continually trying to re-lookup these values, which could get racy if two different threads are each calling `git_sysdir_get` and trying to lookup / clear the value simultaneously.
Diffstat (limited to 'src/sysdir.h')
-rw-r--r--src/sysdir.h5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/sysdir.h b/src/sysdir.h
index 12874fc85..11878981c 100644
--- a/src/sysdir.h
+++ b/src/sysdir.h
@@ -103,9 +103,4 @@ extern int git_sysdir_get_str(char *out, size_t outlen, git_sysdir_t which);
*/
extern int git_sysdir_set(git_sysdir_t which, const char *paths);
-/**
- * Free the configuration file search paths.
- */
-extern void git_sysdir_global_shutdown(void);
-
#endif /* INCLUDE_sysdir_h__ */