From b78bde3d74b1617d5b635723552aaec0583eb054 Mon Sep 17 00:00:00 2001 From: lhchavez Date: Fri, 4 Dec 2020 19:54:26 -0800 Subject: 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. --- revert.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'revert.go') 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), } } -- cgit v1.2.3