summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <[email protected]>2014-03-11 03:09:48 +0100
committerCarlos Martín Nieto <[email protected]>2014-03-11 03:09:48 +0100
commit42fce02197789a1577ff7130f7f46ce47e584aca (patch)
tree65c00f38607784fa3462c5f5d83256c5608f14d3
parent731f978b5483217e09d172408cc1152bc84dda54 (diff)
Adjust to checkout_opts -> checkout_options
-rw-r--r--checkout.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/checkout.go b/checkout.go
index d3cd47b..5becd0e 100644
--- a/checkout.go
+++ b/checkout.go
@@ -2,8 +2,8 @@ package git
/*
#include <git2.h>
-git_checkout_opts git_checkout_opts_init() {
- git_checkout_opts ret = GIT_CHECKOUT_OPTS_INIT;
+git_checkout_options git_checkout_opts_init() {
+ git_checkout_options ret = GIT_CHECKOUT_OPTIONS_INIT;
return ret;
}
*/
@@ -43,7 +43,7 @@ type CheckoutOpts struct {
}
// Convert the CheckoutOpts struct to the corresponding C-struct
-func populateCheckoutOpts(ptr *C.git_checkout_opts, opts *CheckoutOpts) {
+func populateCheckoutOpts(ptr *C.git_checkout_options, opts *CheckoutOpts) {
*ptr = C.git_checkout_opts_init()
if opts == nil {
return
@@ -57,7 +57,7 @@ func populateCheckoutOpts(ptr *C.git_checkout_opts, opts *CheckoutOpts) {
// Updates files in the index and the working tree to match the content of
// the commit pointed at by HEAD.
func (v *Repository) Checkout(opts *CheckoutOpts) error {
- var copts C.git_checkout_opts
+ var copts C.git_checkout_options
populateCheckoutOpts(&copts, opts)
runtime.LockOSThread()
@@ -73,7 +73,7 @@ func (v *Repository) Checkout(opts *CheckoutOpts) error {
// Updates files in the working tree to match the content of the index.
func (v *Repository) CheckoutIndex(index *Index, opts *CheckoutOpts) error {
- var copts C.git_checkout_opts
+ var copts C.git_checkout_options
populateCheckoutOpts(&copts, opts)
runtime.LockOSThread()