Skip to content

Instantly share code, notes, and snippets.

@fracek
Created Jul 4, 2014
Embed
What would you like to do?
define git-options <git-clone-options*>
option git-clone-options$version => version;
option git-clone-options$checkout-opts => checkout-options;
option git-clone-options$remote-callbacks => remote-callbacks;
option git-clone-options$bare => bare?;
option git-clone-options$ignore-cert-errors => ignore-cert-errors;
option git-clone-options$local => local?;
option git-clone-options$remote-name => remote-name;
option git-clone-options$checkout-branch => checkout-branch;
option git-clone-options$signature => signature;
end git-options;
define method git-clone
(url :: <string>, path :: <string>,
#key checkout-options = #f,
remote-callbacks = #f,
bare? = #f,
ignore-cert-errors = #f,
local? = #f,
remote-name = #f,
checkout-branch = #f,
signature = #f)
=> (err, repo)
let options
= if (checkout-options | remote-callbacks | bare? | ignore-cert-errors |
local? | remote-name | checkout-branch | signature)
make(<git-clone-options*>,
checkout-options: checkout-options,
remote-callbacks: remote-callbacks,
bare?: bare?,
ignore-cert-errors: ignore-cert-errors,
local?: local?,
remote-name: remote-name,
checkout-branch: checkout-branch,
signature: signature)
else
null-pointer(<git-clone-options*>)
end if;
%git-clone(url, path, options)
end method git-clone;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment