MCPcopy Create free account
hub / github.com/libgit2/git2go / populateCloneOptions

Function populateCloneOptions

clone.go:98–118  ·  view source on GitHub ↗
(copts *C.git_clone_options, opts *CloneOptions, errorTarget *error)

Source from the content-addressed store, hash-verified

96}
97
98func populateCloneOptions(copts *C.git_clone_options, opts *CloneOptions, errorTarget *error) *C.git_clone_options {
99 C.git_clone_options_init(copts, C.GIT_CLONE_OPTIONS_VERSION)
100 if opts == nil {
101 return nil
102 }
103 populateCheckoutOptions(&copts.checkout_opts, &opts.CheckoutOptions, errorTarget)
104 populateFetchOptions(&copts.fetch_opts, &opts.FetchOptions, errorTarget)
105 copts.bare = cbool(opts.Bare)
106
107 if opts.RemoteCreateCallback != nil {
108 data := &cloneCallbackData{
109 options: opts,
110 errorTarget: errorTarget,
111 }
112 // Go v1.1 does not allow to assign a C function pointer
113 C._go_git_populate_clone_callbacks(copts)
114 copts.remote_cb_payload = pointerHandles.Track(data)
115 }
116
117 return copts
118}
119
120func freeCloneOptions(copts *C.git_clone_options) {
121 if copts == nil {

Callers 1

CloneFunction · 0.85

Calls 4

populateCheckoutOptionsFunction · 0.85
populateFetchOptionsFunction · 0.85
cboolFunction · 0.85
TrackMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…