Remove Version from RevertOptions
Version is defaulted to GIT_REVERT_OPTIONS_VERSION
This commit is contained in:
parent
30c3d0ffe2
commit
4bca045e5a
|
@ -10,7 +10,6 @@ import (
|
||||||
|
|
||||||
// RevertOptions contains options for performing a revert
|
// RevertOptions contains options for performing a revert
|
||||||
type RevertOptions struct {
|
type RevertOptions struct {
|
||||||
Version uint
|
|
||||||
Mainline uint
|
Mainline uint
|
||||||
MergeOpts MergeOptions
|
MergeOpts MergeOptions
|
||||||
CheckoutOpts CheckoutOpts
|
CheckoutOpts CheckoutOpts
|
||||||
|
@ -18,7 +17,7 @@ type RevertOptions struct {
|
||||||
|
|
||||||
func (opts *RevertOptions) toC() *C.git_revert_options {
|
func (opts *RevertOptions) toC() *C.git_revert_options {
|
||||||
return &C.git_revert_options{
|
return &C.git_revert_options{
|
||||||
version: C.uint(opts.Version),
|
version: C.GIT_REVERT_OPTIONS_VERSION,
|
||||||
mainline: C.uint(opts.Mainline),
|
mainline: C.uint(opts.Mainline),
|
||||||
merge_opts: *opts.MergeOpts.toC(),
|
merge_opts: *opts.MergeOpts.toC(),
|
||||||
checkout_opts: *opts.CheckoutOpts.toC(),
|
checkout_opts: *opts.CheckoutOpts.toC(),
|
||||||
|
@ -27,7 +26,6 @@ func (opts *RevertOptions) toC() *C.git_revert_options {
|
||||||
|
|
||||||
func revertOptionsFromC(opts *C.git_revert_options) RevertOptions {
|
func revertOptionsFromC(opts *C.git_revert_options) RevertOptions {
|
||||||
return RevertOptions{
|
return RevertOptions{
|
||||||
Version: uint(opts.version),
|
|
||||||
Mainline: uint(opts.mainline),
|
Mainline: uint(opts.mainline),
|
||||||
MergeOpts: mergeOptionsFromC(&opts.merge_opts),
|
MergeOpts: mergeOptionsFromC(&opts.merge_opts),
|
||||||
CheckoutOpts: checkoutOptionsFromC(&opts.checkout_opts),
|
CheckoutOpts: checkoutOptionsFromC(&opts.checkout_opts),
|
||||||
|
|
Loading…
Reference in New Issue