summaryrefslogtreecommitdiff
path: root/src/clone.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/clone.c')
-rw-r--r--src/clone.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/clone.c b/src/clone.c
index ab22d9ead..865521bce 100644
--- a/src/clone.c
+++ b/src/clone.c
@@ -355,16 +355,23 @@ static int clone_internal(
return retcode;
}
-int git_clone(git_clone_options *options)
+int git_clone(
+ git_repository **out,
+ git_remote *origin,
+ const char *local_path,
+ const git_clone_options *options)
{
- assert(options && options->out && options->origin_remote && options->local_path);
+ git_clone_options dummy_options = GIT_CLONE_OPTIONS_INIT;
+
+ assert(out && origin && local_path);
+ if (!options) options = &dummy_options;
GITERR_CHECK_VERSION(options, GIT_CLONE_OPTIONS_VERSION, "git_clone_options");
return clone_internal(
- options->out,
- options->origin_remote,
- options->local_path,
+ out,
+ origin,
+ local_path,
options->fetch_progress_cb,
options->fetch_progress_payload,
options->checkout_opts,