summaryrefslogtreecommitdiff
path: root/stash.go
diff options
context:
space:
mode:
authorCalin Seciu <[email protected]>2016-02-20 14:33:47 +0200
committerCalin Seciu <[email protected]>2016-02-20 14:43:46 +0200
commit5191254a66ac049611fb16e4bb5f273aeb2ac322 (patch)
treed5ba60b0f11855a4317bc9aa27bcac4b80171af3 /stash.go
parentd54ea1d6a88406fc29db2596ce71f5c00aa4d205 (diff)
Fix problems based on PR comments
https://github.com/libgit2/git2go/pull/257#discussion_r53432957 https://github.com/libgit2/git2go/pull/257#discussion_r53443418
Diffstat (limited to 'stash.go')
-rw-r--r--stash.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/stash.go b/stash.go
index 5142b82..7a4fc93 100644
--- a/stash.go
+++ b/stash.go
@@ -155,8 +155,6 @@ func DefaultStashApplyOptions() (StashApplyOptions, error) {
if ecode < 0 {
return StashApplyOptions{}, MakeGitError(ecode)
}
- defer freeStashApplyOptions(&optsC)
-
return StashApplyOptions{
Flags: StashApplyFlag(optsC.flags),
CheckoutOptions: checkoutOptionsFromC(&optsC.checkout_options),
@@ -172,10 +170,10 @@ func (opts *StashApplyOptions) toC() (
}
optsC = &C.git_stash_apply_options{
- version: C.GIT_STASH_APPLY_OPTIONS_VERSION,
- flags: C.git_stash_apply_flags(opts.Flags),
- checkout_options: *opts.CheckoutOptions.toC(),
+ version: C.GIT_STASH_APPLY_OPTIONS_VERSION,
+ flags: C.git_stash_apply_flags(opts.Flags),
}
+ populateCheckoutOpts(&optsC.checkout_options, &opts.CheckoutOptions)
if opts.ProgressCallback != nil {
C._go_git_setup_stash_apply_progress_callbacks(optsC)
optsC.progress_payload = pointerHandles.Track(progressData)