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

Function populateFetchOptions

remote.go:979–995  ·  view source on GitHub ↗
(copts *C.git_fetch_options, opts *FetchOptions, errorTarget *error)

Source from the content-addressed store, hash-verified

977}
978
979func populateFetchOptions(copts *C.git_fetch_options, opts *FetchOptions, errorTarget *error) *C.git_fetch_options {
980 C.git_fetch_options_init(copts, C.GIT_FETCH_OPTIONS_VERSION)
981 if opts == nil {
982 return nil
983 }
984 populateRemoteCallbacks(&copts.callbacks, &opts.RemoteCallbacks, errorTarget)
985 copts.prune = C.git_fetch_prune_t(opts.Prune)
986 copts.update_fetchhead = cbool(opts.UpdateFetchhead)
987 copts.download_tags = C.git_remote_autotag_option_t(opts.DownloadTags)
988
989 copts.custom_headers = C.git_strarray{
990 count: C.size_t(len(opts.Headers)),
991 strings: makeCStringsFromStrings(opts.Headers),
992 }
993 populateProxyOptions(&copts.proxy_opts, &opts.ProxyOptions)
994 return copts
995}
996
997func freeFetchOptions(copts *C.git_fetch_options) {
998 if copts == nil {

Callers 3

populateCloneOptionsFunction · 0.85
FetchMethod · 0.85

Calls 4

populateRemoteCallbacksFunction · 0.85
cboolFunction · 0.85
makeCStringsFromStringsFunction · 0.85
populateProxyOptionsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…