| layout |
default |
| menu_item |
api |
| title |
Clone |
| description |
Version 0.19.0 |
| return_to |
| API Documentation Index |
/api/ |
|
| sections |
| clone |
initOptions |
LOCAL |
#clone |
#initOptions |
#LOCAL |
|
Clone.clone(url, local_path, [options]).then(function(repository) {
// Use repository
});
Patch repository cloning to automatically coerce objects.
| Parameters |
Type |
|
| url |
String |
url of the repository |
| local_path |
String |
local path to store repository |
| [options] |
CloneOptions |
|
var result = Clone.initOptions(opts, version);
| Parameters |
Type |
|
| opts |
CloneOptions |
The git_clone_options struct to initialize |
| version |
Number |
Version of struct; pass GIT_CLONE_OPTIONS_VERSION |
| Returns |
|
| Number |
Zero on success; -1 on failure. |
| Flag | Value |
| --- | --- | --- |
| Clone.LOCAL.AUTO | 0 |
| Clone.LOCAL.LOCAL | 1 |
| Clone.LOCAL.NO_LOCAL | 2 |
| Clone.LOCAL.NO_LINKS | 3 |