DefaultStashApplyOptions initializes the structure with default values.
()
| 147 | |
| 148 | // DefaultStashApplyOptions initializes the structure with default values. |
| 149 | func DefaultStashApplyOptions() (StashApplyOptions, error) { |
| 150 | optsC := C.git_stash_apply_options{} |
| 151 | |
| 152 | runtime.LockOSThread() |
| 153 | defer runtime.UnlockOSThread() |
| 154 | |
| 155 | ecode := C.git_stash_apply_options_init(&optsC, C.GIT_STASH_APPLY_OPTIONS_VERSION) |
| 156 | if ecode < 0 { |
| 157 | return StashApplyOptions{}, MakeGitError(ecode) |
| 158 | } |
| 159 | return StashApplyOptions{ |
| 160 | Flags: StashApplyFlag(optsC.flags), |
| 161 | CheckoutOptions: checkoutOptionsFromC(&optsC.checkout_options), |
| 162 | }, nil |
| 163 | } |
| 164 | |
| 165 | func populateStashApplyOptions(copts *C.git_stash_apply_options, opts *StashApplyOptions, errorTarget *error) *C.git_stash_apply_options { |
| 166 | C.git_stash_apply_options_init(copts, C.GIT_STASH_APPLY_OPTIONS_VERSION) |