summaryrefslogtreecommitdiff
path: root/commit.go
diff options
context:
space:
mode:
authorCarlos Martín Nieto <[email protected]>2017-07-09 20:10:07 +0200
committerGitHub <[email protected]>2017-07-09 20:10:07 +0200
commit7969aefd42abf3d3d93397760e54c872493e0972 (patch)
tree478e6de1af1cdc7aff71a954423ef5062adcf3fd /commit.go
parent2cff3f2ef4828c755a545e5abacd3d7b2da3fc6d (diff)
parent916d555644a241a55e1779d379618ab89108e850 (diff)
Merge pull request #397 from libgit2/cmn/tag-generic
Tag any kind of object
Diffstat (limited to 'commit.go')
-rw-r--r--commit.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/commit.go b/commit.go
index 5aa5f25..223b093 100644
--- a/commit.go
+++ b/commit.go
@@ -18,6 +18,10 @@ type Commit struct {
cast_ptr *C.git_commit
}
+func (c *Commit) AsObject() *Object {
+ return &c.Object
+}
+
func (c *Commit) Message() string {
ret := C.GoString(C.git_commit_message(c.cast_ptr))
runtime.KeepAlive(c)