From e888805c2b51662a7119e8069e1d8317617bafb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Tue, 18 Jun 2019 11:39:25 +0200 Subject: [PATCH] Merge pull request #506 from takuji/git_commit_message_encoding Add git_commit_message_encoding support (cherry picked from commit b2e2b2f71bb47ae3d4cfde07b39f524f13d0df93) --- commit.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/commit.go b/commit.go index 223b093..6fdfacf 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)