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

Function populateRemoteCreateOptions

remote.go:1231–1247  ·  view source on GitHub ↗
(copts *C.git_remote_create_options, opts *RemoteCreateOptions, repo *Repository)

Source from the content-addressed store, hash-verified

1229}
1230
1231func populateRemoteCreateOptions(copts *C.git_remote_create_options, opts *RemoteCreateOptions, repo *Repository) *C.git_remote_create_options {
1232 C.git_remote_create_options_init(copts, C.GIT_REMOTE_CREATE_OPTIONS_VERSION)
1233 if opts == nil {
1234 return nil
1235 }
1236
1237 var cRepository *C.git_repository
1238 if repo != nil {
1239 cRepository = repo.ptr
1240 }
1241 copts.repository = cRepository
1242 copts.name = C.CString(opts.Name)
1243 copts.fetchspec = C.CString(opts.FetchSpec)
1244 copts.flags = C.uint(opts.Flags)
1245
1246 return copts
1247}
1248
1249func freeRemoteCreateOptions(ptr *C.git_remote_create_options) {
1250 if ptr == nil {

Callers 1

CreateWithOptionsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…