diff options
| author | Jesse Ezell <[email protected]> | 2014-03-11 13:19:12 -0700 |
|---|---|---|
| committer | Jesse Ezell <[email protected]> | 2014-03-11 13:19:12 -0700 |
| commit | d560b9e9bd7162334f7122dadd02cd0a075e22ab (patch) | |
| tree | 0a21848d1a11236409542c011ddcbdd72f3bddc1 /clone.go | |
| parent | 634acbe498e40e617b4aefcce7a82887a455a04e (diff) | |
cleanup clone code
Diffstat (limited to 'clone.go')
| -rw-r--r-- | clone.go | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -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 } |
