diff options
| author | Karsten Dambekalns <[email protected]> | 2016-09-09 15:27:07 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2016-09-09 15:27:07 +0200 |
| commit | d2b8c99ba7169a312f317e1222af4a7b561e377b (patch) | |
| tree | 6e424a6a0ef8568b581f4342f98cb9df7954c9fa | |
| parent | 8eb8fa3725d8d857c58fcb0b7d64a85d8b7bebdc (diff) | |
Add method to fetch raw commit message
The existing `Commit.Message()` returns the trimmed commit message. In some cases
it is important to retrieve the exact commit message, even if it contains surrounding
newlines.
This adds a new `Commit.RawMessage()` to be able to do that.
| -rw-r--r-- | commit.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -22,6 +22,10 @@ func (c Commit) Message() string { return C.GoString(C.git_commit_message(c.cast_ptr)) } +func (c Commit) RawMessage() string { + return C.GoString(C.git_commit_message_raw(c.cast_ptr)) +} + func (c Commit) Summary() string { return C.GoString(C.git_commit_summary(c.cast_ptr)) } |
