summaryrefslogtreecommitdiff
path: root/src/libgit2/clone.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libgit2/clone.c')
-rw-r--r--src/libgit2/clone.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/libgit2/clone.c b/src/libgit2/clone.c
index 5e07dc733..6f34cb7ca 100644
--- a/src/libgit2/clone.c
+++ b/src/libgit2/clone.c
@@ -389,11 +389,6 @@ static int checkout_branch(git_repository *repo, git_remote *remote, const git_c
return error;
}
-static int git_fetch_is_shallow(const git_fetch_options *opts)
-{
- return opts->depth > 0;
-}
-
static int clone_into(git_repository *repo, git_remote *_remote, const git_fetch_options *opts, const git_checkout_options *co_opts, const char *branch)
{
int error;
@@ -415,7 +410,7 @@ static int clone_into(git_repository *repo, git_remote *_remote, const git_fetch
memcpy(&fetch_opts, opts, sizeof(git_fetch_options));
fetch_opts.update_fetchhead = 0;
- if (!git_fetch_is_shallow(opts))
+ if (opts->depth <= 0)
fetch_opts.download_tags = GIT_REMOTE_DOWNLOAD_TAGS_ALL;
git_str_printf(&reflog_message, "clone: from %s", git_remote_url(remote));