Skip to content

Commit 69334f8

Browse files
committed
move init call into git2_curl::register
1 parent 437e22e commit 69334f8

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

git2-curl/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ curl = "0.4"
1717
url = "1.0"
1818
log = "0.4"
1919
git2 = { path = "..", version = "0.8", default-features = false }
20+
libgit2-sys = { path = "../libgit2-sys", version = "0.7.11" }
2021

2122
[dev-dependencies]
2223
civet = "0.11"
2324
conduit = "0.8"
2425
conduit-git-http-backend = "0.8"
2526
tempfile = "3.0"
26-
libgit2-sys = { path = "../libgit2-sys", version = "0.7.11" }
2727

2828
[[test]]
2929
name = "all"

git2-curl/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ pub unsafe fn register(handle: Easy) {
7575
let handle = Arc::new(Mutex::new(handle));
7676
let handle2 = handle.clone();
7777
INIT.call_once(move || {
78+
libgit2_sys::init();
7879
git2::transport::register("http", move |remote| {
7980
factory(remote, handle.clone())
8081
}).unwrap();

git2-curl/tests/all.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ const PORT: u16 = 7848;
1515

1616
fn main() {
1717
unsafe {
18-
libgit2_sys::init();
1918
git2_curl::register(curl::easy::Easy::new());
2019
}
2120

0 commit comments

Comments
 (0)