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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libgit2/clone.c b/src/libgit2/clone.c
index b73880e44..fca0ca0cc 100644
--- a/src/libgit2/clone.c
+++ b/src/libgit2/clone.c
@@ -420,7 +420,9 @@ static int clone_into(
memcpy(&fetch_opts, opts, sizeof(git_fetch_options));
fetch_opts.update_fetchhead = 0;
- fetch_opts.download_tags = GIT_REMOTE_DOWNLOAD_TAGS_ALL;
+
+ if (!opts->depth)
+ fetch_opts.download_tags = GIT_REMOTE_DOWNLOAD_TAGS_ALL;
if ((error = git_remote_connect_options__from_fetch_opts(&connect_opts, remote, &fetch_opts)) < 0)
goto cleanup;