diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2014-06-30 21:36:38 +0200 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2014-07-02 07:05:00 +0200 |
commit | 6812afaf385422fbcc6fb494ff892426fbce1cbc (patch) | |
tree | c29698b438b6c74e73eeb9f220e230f1ef33539a /src/clone.c | |
parent | d58a64e9a5d32b511447943f20a84340b520872f (diff) | |
download | libgit2-cmn/clone-custom-repo.tar.gz |
clone: remote git_clone_into{,_local} from the public APIcmn/clone-custom-repo
As git_clone now has callbacks to configure the details of the
repository and remote, remove the lower-level functions from the public
API, as they lack some of the logic from git_clone proper.
Diffstat (limited to 'src/clone.c')
-rw-r--r-- | src/clone.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/clone.c b/src/clone.c index 8894f97ea..8f0284ae6 100644 --- a/src/clone.c +++ b/src/clone.c @@ -24,6 +24,8 @@ #include "repository.h" #include "odb.h" +static int clone_local_into(git_repository *repo, git_remote *remote, const git_checkout_options *co_opts, const char *branch, int link, const git_signature *signature); + static int create_branch( git_reference **branch, git_repository *repo, @@ -329,7 +331,7 @@ static int checkout_branch(git_repository *repo, git_remote *remote, const git_c return error; } -int git_clone_into(git_repository *repo, git_remote *_remote, const git_checkout_options *co_opts, const char *branch, const git_signature *signature) +static int clone_into(git_repository *repo, git_remote *_remote, const git_checkout_options *co_opts, const char *branch, const git_signature *signature) { int error; git_buf reflog_message = GIT_BUF_INIT; @@ -434,11 +436,11 @@ int git_clone( if (!(error = create_and_configure_origin(&origin, repo, url, &options))) { if (git_clone__should_clone_local(url, options.local)) { int link = options.local != GIT_CLONE_LOCAL_NO_LINKS; - error = git_clone_local_into( + error = clone_local_into( repo, origin, &options.checkout_opts, options.checkout_branch, link, options.signature); } else { - error = git_clone_into( + error = clone_into( repo, origin, &options.checkout_opts, options.checkout_branch, options.signature); } @@ -498,7 +500,7 @@ static bool can_link(const char *src, const char *dst, int link) #endif } -int git_clone_local_into(git_repository *repo, git_remote *remote, const git_checkout_options *co_opts, const char *branch, int link, const git_signature *signature) +static int clone_local_into(git_repository *repo, git_remote *remote, const git_checkout_options *co_opts, const char *branch, int link, const git_signature *signature) { int error, flags; git_repository *src; |