| 101 | } |
| 102 | |
| 103 | func (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 | |
| 126 | func (c *Commit) Summary() string { |
| 127 | ret := C.GoString(C.git_commit_summary(c.cast_ptr)) |