func populateCloneOptions(ptr *C.git_clone_options, opts *CloneOptions) { C.git_clone_init_options(ptr, C.GIT_CLONE_OPTIONS_VERSION) if opts == nil { return } populateCheckoutOpts(&ptr.checkout_opts, opts.CheckoutOpts) populateRemoteCallbacks(&ptr.remote_callbacks, opts.RemoteCallbacks) if opts.Bare { ptr.bare = 1 } else { ptr.bare = 0 } if opts.IgnoreCertErrors { ptr.ignore_cert_errors = 1 } else { ptr.ignore_cert_errors = 0 } }