summaryrefslogtreecommitdiff
path: root/revert.go
diff options
context:
space:
mode:
authorlhchavez <[email protected]>2020-12-04 19:54:26 -0800
committerlhchavez <[email protected]>2021-09-05 18:52:01 -0700
commitb78bde3d74b1617d5b635723552aaec0583eb054 (patch)
tree16c98859171b6483b61ac710672694d823db2e1b /revert.go
parent5def02a589a2c1653f4bb515fdec290361a222be (diff)
Make all Options objects consistent
This change makes all Options objects have child Option fields as values (instead of pointers) to mirror the libgit2 interface. It also names them Options instead of Opts to match the current libgit2 nomenclature and removes the Version fields.
Diffstat (limited to 'revert.go')
-rw-r--r--revert.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/revert.go b/revert.go
index 085df16..76ddf53 100644
--- a/revert.go
+++ b/revert.go
@@ -10,9 +10,9 @@ import (
// RevertOptions contains options for performing a revert
type RevertOptions struct {
- Mainline uint
- MergeOpts MergeOptions
- CheckoutOpts CheckoutOptions
+ Mainline uint
+ MergeOptions MergeOptions
+ CheckoutOptions CheckoutOptions
}
func populateRevertOptions(copts *C.git_revert_options, opts *RevertOptions, errorTarget *error) *C.git_revert_options {
@@ -21,16 +21,16 @@ func populateRevertOptions(copts *C.git_revert_options, opts *RevertOptions, err
return nil
}
copts.mainline = C.uint(opts.Mainline)
- populateMergeOptions(&copts.merge_opts, &opts.MergeOpts)
- populateCheckoutOptions(&copts.checkout_opts, &opts.CheckoutOpts, errorTarget)
+ populateMergeOptions(&copts.merge_opts, &opts.MergeOptions)
+ populateCheckoutOptions(&copts.checkout_opts, &opts.CheckoutOptions, errorTarget)
return copts
}
func revertOptionsFromC(copts *C.git_revert_options) RevertOptions {
return RevertOptions{
- Mainline: uint(copts.mainline),
- MergeOpts: mergeOptionsFromC(&copts.merge_opts),
- CheckoutOpts: checkoutOptionsFromC(&copts.checkout_opts),
+ Mainline: uint(copts.mainline),
+ MergeOptions: mergeOptionsFromC(&copts.merge_opts),
+ CheckoutOptions: checkoutOptionsFromC(&copts.checkout_opts),
}
}