DefaultApplyOptions returns default options for remote create
()
| 1214 | |
| 1215 | // DefaultApplyOptions returns default options for remote create |
| 1216 | func DefaultRemoteCreateOptions() (*RemoteCreateOptions, error) { |
| 1217 | runtime.LockOSThread() |
| 1218 | defer runtime.UnlockOSThread() |
| 1219 | |
| 1220 | opts := C.git_remote_create_options{} |
| 1221 | ecode := C.git_remote_create_options_init(&opts, C.GIT_REMOTE_CREATE_OPTIONS_VERSION) |
| 1222 | if ecode < 0 { |
| 1223 | return nil, MakeGitError(ecode) |
| 1224 | } |
| 1225 | |
| 1226 | return &RemoteCreateOptions{ |
| 1227 | Flags: RemoteCreateOptionsFlag(opts.flags), |
| 1228 | }, nil |
| 1229 | } |
| 1230 | |
| 1231 | func 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) |
searching dependent graphs…