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

Function DefaultStashApplyOptions

stash.go:149–163  ·  view source on GitHub ↗

DefaultStashApplyOptions initializes the structure with default values.

()

Source from the content-addressed store, hash-verified

147
148// DefaultStashApplyOptions initializes the structure with default values.
149func 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
165func 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)

Callers 1

TestStashFunction · 0.85

Calls 3

MakeGitErrorFunction · 0.85
StashApplyFlagTypeAlias · 0.85
checkoutOptionsFromCFunction · 0.85

Tested by 1

TestStashFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…