summaryrefslogtreecommitdiff
path: root/commit.go
diff options
context:
space:
mode:
authorlhchavez <[email protected]>2020-02-23 13:53:17 +0000
committerlhchavez <[email protected]>2020-02-23 13:53:17 +0000
commitc20008416a64e2ae884a14332b258160a261a5df (patch)
tree58ae95d9f007937876eed1aac89b0518a034e442 /commit.go
parent79fe156d307a9c7b294aa92c741dc0c2759a1894 (diff)
parent4bca045e5aa98b0b791fb467705de0692fe3514f (diff)
Merge remote-tracking branch 'upstream/master' into git_index_add_frombuffer
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)