summaryrefslogtreecommitdiff
path: root/clone.go
diff options
context:
space:
mode:
authorjoseferminj <[email protected]>2015-01-22 00:44:51 -0500
committerCarlos Martín Nieto <[email protected]>2015-01-29 15:17:46 +0100
commit92a1f92d912cdb5f68da8c1e5e3a4d1ebfd282db (patch)
treeed333eda917e3c7976e427479c04ccbcf6d90777 /clone.go
parenta9d993f3d1400970bfba572747edbee1b57fd221 (diff)
Add TargetDirectory field to Checkout options.
TargetDirectory field indicates a alternative checkout path to workdir.
Diffstat (limited to 'clone.go')
-rw-r--r--clone.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/clone.go b/clone.go
index 2e0fcce..b796b6e 100644
--- a/clone.go
+++ b/clone.go
@@ -30,6 +30,7 @@ func Clone(url string, path string, options *CloneOptions) (*Repository, error)
var copts C.git_clone_options
populateCloneOptions(&copts, options)
+ defer freeCheckoutOpts(&copts.checkout_opts)
if len(options.CheckoutBranch) != 0 {
copts.checkout_branch = C.CString(options.CheckoutBranch)