Expose baseline field in CheckoutOptions #253

Merged
joseferminj merged 1 commits from checkout-baseline into master 2015-09-18 15:55:04 -05:00
1 changed files with 7 additions and 2 deletions

View File

@ -44,7 +44,8 @@ type CheckoutOpts struct {
FileMode os.FileMode // Default is 0644 or 0755 as dictated by blob
FileOpenFlags int // Default is O_CREAT | O_TRUNC | O_WRONLY
TargetDirectory string // Alternative checkout path to workdir
Paths []string
Paths []string
Baseline *Tree
}
func checkoutOptionsFromC(c *C.git_checkout_options) CheckoutOpts {
@ -90,6 +91,10 @@ func populateCheckoutOpts(ptr *C.git_checkout_options, opts *CheckoutOpts) *C.gi
ptr.paths.count = C.size_t(len(opts.Paths))
}
if opts.Baseline != nil {
ptr.baseline = opts.Baseline.cast_ptr
}
return ptr
}
@ -156,4 +161,4 @@ func (v *Repository) CheckoutTree(tree *Tree, opts *CheckoutOpts) error {
}
return nil
}
}