Merge pull request #253 from joseferminj/checkout-baseline
Expose baseline field in CheckoutOptions
This commit is contained in:
commit
1c855246ca
|
@ -45,6 +45,7 @@ type CheckoutOpts struct {
|
||||||
FileOpenFlags int // Default is O_CREAT | O_TRUNC | O_WRONLY
|
FileOpenFlags int // Default is O_CREAT | O_TRUNC | O_WRONLY
|
||||||
TargetDirectory string // Alternative checkout path to workdir
|
TargetDirectory string // Alternative checkout path to workdir
|
||||||
Paths []string
|
Paths []string
|
||||||
|
Baseline *Tree
|
||||||
}
|
}
|
||||||
|
|
||||||
func checkoutOptionsFromC(c *C.git_checkout_options) CheckoutOpts {
|
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))
|
ptr.paths.count = C.size_t(len(opts.Paths))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if opts.Baseline != nil {
|
||||||
|
ptr.baseline = opts.Baseline.cast_ptr
|
||||||
|
}
|
||||||
|
|
||||||
return ptr
|
return ptr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue