Calin Seciu 2016-02-20 14:33:47 +02:00
parent d54ea1d6a8
commit 5191254a66
1 changed files with 3 additions and 5 deletions

View File

@ -155,8 +155,6 @@ func DefaultStashApplyOptions() (StashApplyOptions, error) {
if ecode < 0 { if ecode < 0 {
return StashApplyOptions{}, MakeGitError(ecode) return StashApplyOptions{}, MakeGitError(ecode)
} }
defer freeStashApplyOptions(&optsC)
return StashApplyOptions{ return StashApplyOptions{
Flags: StashApplyFlag(optsC.flags), Flags: StashApplyFlag(optsC.flags),
CheckoutOptions: checkoutOptionsFromC(&optsC.checkout_options), CheckoutOptions: checkoutOptionsFromC(&optsC.checkout_options),
@ -174,8 +172,8 @@ func (opts *StashApplyOptions) toC() (
optsC = &C.git_stash_apply_options{ optsC = &C.git_stash_apply_options{
version: C.GIT_STASH_APPLY_OPTIONS_VERSION, version: C.GIT_STASH_APPLY_OPTIONS_VERSION,
flags: C.git_stash_apply_flags(opts.Flags), flags: C.git_stash_apply_flags(opts.Flags),
checkout_options: *opts.CheckoutOptions.toC(),
} }
populateCheckoutOpts(&optsC.checkout_options, &opts.CheckoutOptions)
if opts.ProgressCallback != nil { if opts.ProgressCallback != nil {
C._go_git_setup_stash_apply_progress_callbacks(optsC) C._go_git_setup_stash_apply_progress_callbacks(optsC)
optsC.progress_payload = pointerHandles.Track(progressData) optsC.progress_payload = pointerHandles.Track(progressData)