summaryrefslogtreecommitdiff
path: root/clone.go
diff options
context:
space:
mode:
authorJesse Ezell <[email protected]>2014-03-11 13:19:12 -0700
committerJesse Ezell <[email protected]>2014-03-11 13:19:12 -0700
commitd560b9e9bd7162334f7122dadd02cd0a075e22ab (patch)
tree0a21848d1a11236409542c011ddcbdd72f3bddc1 /clone.go
parent634acbe498e40e617b4aefcce7a82887a455a04e (diff)
cleanup clone code
Diffstat (limited to 'clone.go')
-rw-r--r--clone.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/clone.go b/clone.go
index 630c343..51dbd65 100644
--- a/clone.go
+++ b/clone.go
@@ -4,11 +4,6 @@ package git
#include <git2.h>
#include <git2/errors.h>
-static git_clone_options git_clone_options_init() {
- git_clone_options ret = GIT_CLONE_OPTIONS_INIT;
- return ret;
-}
-
*/
import "C"
import (
@@ -60,7 +55,9 @@ func Clone(url string, path string, options *CloneOptions) (*Repository, error)
}
func populateCloneOptions(ptr *C.git_clone_options, opts *CloneOptions) {
- *ptr = C.git_clone_options_init()
+ ptr = &C.git_clone_options{}
+ C.git_clone_init_options(ptr, 1)
+
if opts == nil {
return
}