summaryrefslogtreecommitdiff
path: root/index.go
diff options
context:
space:
mode:
authorJesper Hansen <[email protected]>2013-07-07 16:43:44 +0200
committerCarlos Martín Nieto <[email protected]>2014-02-26 16:10:00 +0100
commit499f52a3549503604f30663211361e2fbd3cf202 (patch)
treeef2008e677ad5eae7f9443bb0d150b85673cb01b /index.go
parent3e5586bd8d532c929aecf778fc094e4f86588d37 (diff)
Added git error code to the error object.
Diffstat (limited to 'index.go')
-rw-r--r--index.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/index.go b/index.go
index bc11025..cbb28c4 100644
--- a/index.go
+++ b/index.go
@@ -42,7 +42,7 @@ func (v *Index) AddByPath(path string) error {
ret := C.git_index_add_bypath(v.ptr, cstr)
if ret < 0 {
- return LastError()
+ return MakeGitError(ret)
}
return nil
@@ -56,7 +56,7 @@ func (v *Index) WriteTree() (*Oid, error) {
ret := C.git_index_write_tree(oid.toC(), v.ptr)
if ret < 0 {
- return nil, LastError()
+ return nil, MakeGitError(ret)
}
return oid, nil