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

Method ExtractSignature

commit.go:103–124  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

101}
102
103func (c *Commit) ExtractSignature() (string, string, error) {
104
105 var c_signed C.git_buf
106 defer C.git_buf_dispose(&c_signed)
107
108 var c_signature C.git_buf
109 defer C.git_buf_dispose(&c_signature)
110
111 oid := c.Id()
112 repo := C.git_commit_owner(c.cast_ptr)
113
114 runtime.LockOSThread()
115 defer runtime.UnlockOSThread()
116 ret := C.git_commit_extract_signature(&c_signature, &c_signed, repo, oid.toC(), nil)
117 runtime.KeepAlive(oid)
118 if ret < 0 {
119 return "", "", MakeGitError(ret)
120 } else {
121 return C.GoString(c_signature.ptr), C.GoString(c_signed.ptr), nil
122 }
123
124}
125
126func (c *Commit) Summary() string {
127 ret := C.GoString(C.git_commit_summary(c.cast_ptr))

Callers 1

checkCommitSignedFunction · 0.80

Calls 3

MakeGitErrorFunction · 0.85
IdMethod · 0.45
toCMethod · 0.45

Tested by 1

checkCommitSignedFunction · 0.64