summaryrefslogtreecommitdiff
path: root/commit.go
diff options
context:
space:
mode:
authorlhchavez <[email protected]>2020-02-23 14:49:04 +0000
committerlhchavez <[email protected]>2020-02-23 14:49:04 +0000
commit627447092fa24035ed3cd4cf31932dbef6f5a57f (patch)
tree48a9122be45522cf1ec72535cec18fd701db55d2 /commit.go
parent03339f731aba66baacab3fd67e7b2d185cdacb33 (diff)
parent06764f48dce903bf95701c6ef75ad0fe46c0dedf (diff)
Merge remote-tracking branch 'upstream/master' into more-annotated-commit
Diffstat (limited to 'commit.go')
-rw-r--r--commit.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/commit.go b/commit.go
index 223b093..4262060 100644
--- a/commit.go
+++ b/commit.go
@@ -28,6 +28,12 @@ func (c *Commit) Message() string {
return ret
}
+func (c *Commit) MessageEncoding() string {
+ ret := C.GoString(C.git_commit_message_encoding(c.cast_ptr))
+ runtime.KeepAlive(c)
+ return ret
+}
+
func (c *Commit) RawMessage() string {
ret := C.GoString(C.git_commit_message_raw(c.cast_ptr))
runtime.KeepAlive(c)
@@ -37,10 +43,10 @@ func (c *Commit) RawMessage() string {
func (c *Commit) ExtractSignature() (string, string, error) {
var c_signed C.git_buf
- defer C.git_buf_free(&c_signed)
+ defer C.git_buf_dispose(&c_signed)
var c_signature C.git_buf
- defer C.git_buf_free(&c_signature)
+ defer C.git_buf_dispose(&c_signature)
oid := c.Id()
repo := C.git_commit_owner(c.cast_ptr)