diff options
| author | Carlos Martín Nieto <[email protected]> | 2015-08-31 20:12:45 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <[email protected]> | 2015-08-31 20:12:45 +0200 |
| commit | d59752528c627fd511e2969b9daa672d4d8adc7d (patch) | |
| tree | 48a919fa85a76a69e3a19768edb7ac12d1d03d09 /commit.go | |
| parent | c6c2e9389fd2148d20f2e283000f5b4204dbcdc8 (diff) | |
| parent | b7159b0cd4b25ee3b1a8eb9e0d4991d297487a36 (diff) | |
Merge pull request #237 from libgit2/object-type
Move from an Object interface to a type
Diffstat (limited to 'commit.go')
| -rw-r--r-- | commit.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -14,7 +14,7 @@ import ( // Commit type Commit struct { - gitObject + Object cast_ptr *C.git_commit } @@ -37,7 +37,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 +61,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 { |
