DefaultApplyOptions returns default options for applying diffs or patches.
()
| 960 | |
| 961 | // DefaultApplyOptions returns default options for applying diffs or patches. |
| 962 | func DefaultApplyOptions() (*ApplyOptions, error) { |
| 963 | opts := C.git_apply_options{} |
| 964 | |
| 965 | runtime.LockOSThread() |
| 966 | defer runtime.UnlockOSThread() |
| 967 | |
| 968 | ecode := C.git_apply_options_init(&opts, C.GIT_APPLY_OPTIONS_VERSION) |
| 969 | if int(ecode) != 0 { |
| 970 | return nil, MakeGitError(ecode) |
| 971 | } |
| 972 | |
| 973 | return applyOptionsFromC(&opts), nil |
| 974 | } |
| 975 | |
| 976 | func populateApplyOptions(copts *C.git_apply_options, opts *ApplyOptions, errorTarget *error) *C.git_apply_options { |
| 977 | C.git_apply_options_init(copts, C.GIT_APPLY_OPTIONS_VERSION) |
searching dependent graphs…