summaryrefslogtreecommitdiff
path: root/checkout.go
diff options
context:
space:
mode:
authorJesse Ezell <[email protected]>2014-02-26 08:45:44 -0800
committerJesse Ezell <[email protected]>2014-02-26 08:45:44 -0800
commitbaf4a8433663f87e2732f9c2632a070221f166f2 (patch)
tree2e8ec293db11776d4f6dd448c6f426c8491bc864 /checkout.go
parentfe509411a5e8bd45a1c5607d1cc212d8ebf45541 (diff)
parent1c1f7bd1fab3be4a1274149292979bea4ee8aadf (diff)
Merge branch 'master' of https://github.com/libgit2/git2go into add-branch-lookup
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