summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <[email protected]>2015-09-18 22:55:04 +0200
committerCarlos Martín Nieto <[email protected]>2015-09-18 22:55:04 +0200
commit1c855246ca0cb3faf7d8a644b22355e0ef6856a1 (patch)
tree4ff0e1b554a53d33bbc7339a42bf711dbb964e0f
parentebf7f15bf9c585102b1c39f6bec5f61a37d18802 (diff)
parent9397af0854575913f72b10a7ebf474ef023e2e69 (diff)
Merge pull request #253 from joseferminj/checkout-baseline
Expose baseline field in CheckoutOptions
-rw-r--r--checkout.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/checkout.go b/checkout.go
index e0c067e..a2e312b 100644
--- a/checkout.go
+++ b/checkout.go
@@ -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
-} \ No newline at end of file
+}