diff options
| author | Ben Straub <bs@github.com> | 2012-12-14 13:03:59 -0800 |
|---|---|---|
| committer | Ben Straub <bs@github.com> | 2012-12-14 13:03:59 -0800 |
| commit | 18b2d560d376da8bcb601603346b871c05958772 (patch) | |
| tree | 72776fc9332318c5157ca2e82bd6baa9906a091d /src/clone.c | |
| parent | 7e610440194615fe5970f5f15266893f02a7f6aa (diff) | |
| download | libgit2-18b2d560d376da8bcb601603346b871c05958772.tar.gz | |
Deploy git_clone_options; remove git_clone_bare
Diffstat (limited to 'src/clone.c')
| -rw-r--r-- | src/clone.c | 44 |
1 files changed, 10 insertions, 34 deletions
diff --git a/src/clone.c b/src/clone.c index aa6c43f86..ab22d9ead 100644 --- a/src/clone.c +++ b/src/clone.c @@ -355,42 +355,18 @@ static int clone_internal( return retcode; } -int git_clone_bare( - git_repository **out, - git_remote *origin_remote, - const char *dest_path, - git_transfer_progress_callback fetch_progress_cb, - void *fetch_progress_payload) +int git_clone(git_clone_options *options) { - assert(out && origin_remote && dest_path); + assert(options && options->out && options->origin_remote && options->local_path); - return clone_internal( - out, - origin_remote, - dest_path, - fetch_progress_cb, - fetch_progress_payload, - NULL, - 1); -} - - -int git_clone( - git_repository **out, - git_remote *origin_remote, - const char *workdir_path, - git_checkout_opts *checkout_opts, - git_transfer_progress_callback fetch_progress_cb, - void *fetch_progress_payload) -{ - assert(out && origin_remote && workdir_path); + GITERR_CHECK_VERSION(options, GIT_CLONE_OPTIONS_VERSION, "git_clone_options"); return clone_internal( - out, - origin_remote, - workdir_path, - fetch_progress_cb, - fetch_progress_payload, - checkout_opts, - 0); + options->out, + options->origin_remote, + options->local_path, + options->fetch_progress_cb, + options->fetch_progress_payload, + options->checkout_opts, + options->bare ? 1 : 0); } |
