bur-manager/git2/git2.v

17 lines
252 B
Coq
Raw Normal View History

2022-09-05 13:56:43 +02:00
module git2
fn init() {
C.git_libgit2_init()
}
pub fn clone(url string, path string) !&C.git_repository {
out := &C.git_repository{}
res := C.git_clone(&out, url.str, path.str, 0)
if res != 0 {
return error('Exit code $res')
}
return out
}