diff options
Diffstat (limited to 'commit.go')
| -rw-r--r-- | commit.go | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -14,7 +14,7 @@ import ( // Commit type Commit struct { - gitObject + Object cast_ptr *C.git_commit } @@ -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)) } @@ -37,7 +41,7 @@ func (c Commit) Tree() (*Tree, error) { return nil, MakeGitError(err) } - return allocObject((*C.git_object)(ptr), c.repo).(*Tree), nil + return allocTree(ptr, c.repo), nil } func (c Commit) TreeId() *Oid { @@ -61,7 +65,7 @@ func (c *Commit) Parent(n uint) *Commit { return nil } - return allocObject((*C.git_object)(cobj), c.repo).(*Commit) + return allocCommit(cobj, c.repo) } func (c *Commit) ParentId(n uint) *Oid { |
