summaryrefslogtreecommitdiff
path: root/commit.go
diff options
context:
space:
mode:
authorJesse Ezell <[email protected]>2014-03-20 22:02:19 -0700
committerJesse Ezell <[email protected]>2014-03-20 22:02:19 -0700
commit37964e878f70229171f94668cb96f347b798e2b2 (patch)
tree5781761e13e57edb3589844b6faa799c1158b93a /commit.go
parentd0b334b24409ddc190a7010be0072d87df6b6bfe (diff)
parent2811845a1287d949a74b8ed80a5791fd8875002a (diff)
merge with latest
Diffstat (limited to 'commit.go')
-rw-r--r--commit.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/commit.go b/commit.go
index 498669e..0edebb6 100644
--- a/commit.go
+++ b/commit.go
@@ -31,7 +31,7 @@ func (c Commit) Tree() (*Tree, error) {
err := C.git_commit_tree(&ptr, c.ptr)
if err < 0 {
- return nil, LastError()
+ return nil, MakeGitError(err)
}
return allocObject(ptr).(*Tree), nil
@@ -94,6 +94,11 @@ func (v *Signature) Offset() int {
}
func (sig *Signature) toC() *C.git_signature {
+
+ if sig == nil {
+ return nil
+ }
+
var out *C.git_signature
name := C.CString(sig.Name)