Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/opts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ pub unsafe fn set_search_path<P>(level: ConfigLevel, path: P) -> Result<(), Erro
where
P: IntoCString,
{
crate::init();
call::c_try(raw::git_libgit2_opts(
raw::GIT_OPT_SET_SEARCH_PATH as libc::c_int,
level as libc::c_int,
Expand All @@ -40,6 +41,7 @@ where
/// thread-safety. It needs to be externally synchronized with calls to access
/// the global state.
pub unsafe fn reset_search_path(level: ConfigLevel) -> Result<(), Error> {
crate::init();
call::c_try(raw::git_libgit2_opts(
raw::GIT_OPT_SET_SEARCH_PATH as libc::c_int,
level as libc::c_int,
Expand All @@ -57,6 +59,7 @@ pub unsafe fn reset_search_path(level: ConfigLevel) -> Result<(), Error> {
/// thread-safety. It needs to be externally synchronized with calls to access
/// the global state.
pub unsafe fn get_search_path(level: ConfigLevel) -> Result<CString, Error> {
crate::init();
let buf = Buf::new();
call::c_try(raw::git_libgit2_opts(
raw::GIT_OPT_GET_SEARCH_PATH as libc::c_int,
Expand Down