title: Using NodeGit CloneOptions to clone a branch
body: <p>I am trying to work out how to pass clone options to the nodegit clone method.</p>
  
  <p>The node git documentation states that the 3rd param to the clone method is the clone options object
  <a href="http://www.nodegit.org/nodegit/#Repo-clone" rel="noreferrer">http://www.nodegit.org/nodegit/#Repo-clone</a></p>
  
  <pre><code>git.Repo.clone(URL, path, CloneOptions, callback);
  </code></pre>
  
  <p>However this object is not included in the standard build of nodegit. </p>
  
  <p>I have added the binding for the clone_options.cc file into the bindings.gyp file and I can get access to the clone options object. However I can not work out how to instantiate it with a valid branch name. 
  The libgit2 api shows that the option is checkout_branch
  <a href="http://libgit2.github.com/libgit2/#HEAD/type/git_clone_options" rel="noreferrer">http://libgit2.github.com/libgit2/#HEAD/type/git_clone_options</a></p>
  
  <p>Anyone have any insight on how to do this? Or on an alternative library that supports cloning of git branches in node?</p>
  
  <pre><code>var CloneOptions = nodegit.CloneOptions;
  var options = new CloneOptions({checkout_branch: branchName});
  git.Repo.clone(url, temp, options, function (err, repo) {...});
  </code></pre>
  
  <p>results in</p>
  
  <pre><code>Error: git_clone_options is required.
  </code></pre>
  
  <p>There is also an open thread on the github issues page for nodegit </p>
  
  <p><a href="https://github.com/nodegit/nodegit/issues/127" rel="noreferrer">https://github.com/nodegit/nodegit/issues/127</a></p>