summaryrefslogtreecommitdiff
path: root/odb.go
diff options
context:
space:
mode:
authorAidan Nulman <[email protected]>2014-04-03 16:49:22 -0400
committerAidan Nulman <[email protected]>2014-04-03 16:49:22 -0400
commitfc70808cb7a5fa6e627bb44bbcf9d8f42b1bcd80 (patch)
treed71f7a64f673ebd1e2fef7ea4a3436475b45d0ce /odb.go
parentd9f4adff6c548a6cb6f00258c99129c7e41062b3 (diff)
update for upstream changes
Diffstat (limited to 'odb.go')
-rw-r--r--odb.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/odb.go b/odb.go
index 3b0c864..abfa1cd 100644
--- a/odb.go
+++ b/odb.go
@@ -27,7 +27,7 @@ func NewOdb() (odb *Odb, err error) {
ret := C.git_odb_new(&odb.ptr)
if ret < 0 {
- return nil, LastError()
+ return nil, MakeGitError(ret)
}
runtime.SetFinalizer(odb, (*Odb).Free)
@@ -43,7 +43,7 @@ func (v *Odb) AddBackend(backend *OdbBackend, priority int) (err error) {
ret := C.git_odb_add_backend(v.ptr, backend.ptr, C.int(priority))
if ret < 0 {
backend.Free()
- err = LastError()
+ return MakeGitError(ret)
}
return nil
}