summaryrefslogtreecommitdiff
path: root/checkout.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 /checkout.go
parent3e5586bd8d532c929aecf778fc094e4f86588d37 (diff)
Added git error code to the error object.
Diffstat (limited to 'checkout.go')
-rw-r--r--checkout.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/checkout.go b/checkout.go
index f4c1d4e..d3cd47b 100644
--- a/checkout.go
+++ b/checkout.go
@@ -65,7 +65,7 @@ func (v *Repository) Checkout(opts *CheckoutOpts) error {
ret := C.git_checkout_head(v.ptr, &copts)
if ret < 0 {
- return LastError()
+ return MakeGitError(ret)
}
return nil
@@ -81,7 +81,7 @@ func (v *Repository) CheckoutIndex(index *Index, opts *CheckoutOpts) error {
ret := C.git_checkout_index(v.ptr, index.ptr, &copts)
if ret < 0 {
- return LastError()
+ return MakeGitError(ret)
}
return nil