Skip to content

Commit 4d08ca6

Browse files
rgburkelhchavez
authored andcommitted
Remove Version from RevertOptions
Version is defaulted to GIT_REVERT_OPTIONS_VERSION (cherry picked from commit 4bca045)
1 parent eccd744 commit 4d08ca6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

revert.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,14 @@ import (
1010

1111
// RevertOptions contains options for performing a revert
1212
type RevertOptions struct {
13-
Version uint
1413
Mainline uint
1514
MergeOpts MergeOptions
1615
CheckoutOpts CheckoutOpts
1716
}
1817

1918
func (opts *RevertOptions) toC() *C.git_revert_options {
2019
return &C.git_revert_options{
21-
version: C.uint(opts.Version),
20+
version: C.GIT_REVERT_OPTIONS_VERSION,
2221
mainline: C.uint(opts.Mainline),
2322
merge_opts: *opts.MergeOpts.toC(),
2423
checkout_opts: *opts.CheckoutOpts.toC(),
@@ -27,7 +26,6 @@ func (opts *RevertOptions) toC() *C.git_revert_options {
2726

2827
func revertOptionsFromC(opts *C.git_revert_options) RevertOptions {
2928
return RevertOptions{
30-
Version: uint(opts.version),
3129
Mainline: uint(opts.mainline),
3230
MergeOpts: mergeOptionsFromC(&opts.merge_opts),
3331
CheckoutOpts: checkoutOptionsFromC(&opts.checkout_opts),

0 commit comments

Comments
 (0)