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

Function DefaultCherrypickOptions

cherrypick.go:45–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43}
44
45func DefaultCherrypickOptions() (CherrypickOptions, error) {
46 c := C.git_cherrypick_options{}
47
48 runtime.LockOSThread()
49 defer runtime.UnlockOSThread()
50
51 ecode := C.git_cherrypick_options_init(&c, C.GIT_CHERRYPICK_OPTIONS_VERSION)
52 if ecode < 0 {
53 return CherrypickOptions{}, MakeGitError(ecode)
54 }
55 defer freeCherrypickOpts(&c)
56 return cherrypickOptionsFromC(&c), nil
57}
58
59func (v *Repository) Cherrypick(commit *Commit, opts CherrypickOptions) error {
60 runtime.LockOSThread()

Callers 2

TestCherrypickFunction · 0.85
TestCherrypickCommitFunction · 0.85

Calls 3

MakeGitErrorFunction · 0.85
freeCherrypickOptsFunction · 0.85
cherrypickOptionsFromCFunction · 0.85

Tested by 2

TestCherrypickFunction · 0.68
TestCherrypickCommitFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…