summaryrefslogtreecommitdiff
path: root/commit.go
diff options
context:
space:
mode:
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)