diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2023-05-09 20:38:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-09 20:38:04 +0100 |
commit | 2bbcdee6b666f34e83d1cf9ca9badc66258202d6 (patch) | |
tree | 26a9d405c75564de8e1a3dc8ac4dc1c8ec7421f7 /src/libgit2/clone.c | |
parent | 251408cfd4ff8112efaa5c82ec81c9574c4bf022 (diff) | |
parent | 437c5f5a0b6ae6068168081ac6422dba44cff31d (diff) | |
download | libgit2-2bbcdee6b666f34e83d1cf9ca9badc66258202d6.tar.gz |
Merge pull request #6557 from libgit2/ethomson/shallow
Shallow (#6396) with some fixes from review
Diffstat (limited to 'src/libgit2/clone.c')
-rw-r--r-- | src/libgit2/clone.c | 4 |
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; |