本文整理匯總了Golang中C.git_clone_options.bare方法的典型用法代碼示例。如果您正苦於以下問題:Golang git_clone_options.bare方法的具體用法?Golang git_clone_options.bare怎麽用?Golang git_clone_options.bare使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類C.git_clone_options
的用法示例。
在下文中一共展示了git_clone_options.bare方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: populateCloneOptions
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
}
}
示例2: populateCloneOptions
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.RemoteCreateCallback != nil {
ptr.remote_cb = opts.RemoteCreateCallback
defer C.free(unsafe.Pointer(opts.RemoteCreateCallback))
if opts.RemoteCreatePayload != nil {
ptr.remote_cb_payload = opts.RemoteCreatePayload
defer C.free(opts.RemoteCreatePayload)
}
}
}
示例3: populateCloneOptions
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)
populateFetchOptions(&ptr.fetch_opts, opts.FetchOptions)
ptr.bare = cbool(opts.Bare)
if opts.RemoteCreateCallback != nil {
// Go v1.1 does not allow to assign a C function pointer
C._go_git_populate_remote_cb(ptr)
ptr.remote_cb_payload = pointerHandles.Track(*opts)
}
}