summaryrefslogtreecommitdiff
path: root/src/libgit2/fetch.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2023-05-08 10:17:11 +0100
committerEdward Thomson <ethomson@edwardthomson.com>2023-05-09 17:14:08 +0100
commit437c5f5a0b6ae6068168081ac6422dba44cff31d (patch)
tree885189c81fd54d00f9bc019033237f41ca989653 /src/libgit2/fetch.c
parent0a7e32b2326c02a91f9560dfd209e56ea9fb9d49 (diff)
downloadlibgit2-437c5f5a0b6ae6068168081ac6422dba44cff31d.tar.gz
fetch: remove `unshallow` option
The `depth` field is suitable to specify unshallowing; provide an enum to aide in specifying the `unshallow` value.
Diffstat (limited to 'src/libgit2/fetch.c')
-rw-r--r--src/libgit2/fetch.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libgit2/fetch.c b/src/libgit2/fetch.c
index b43425215..5bbef87f4 100644
--- a/src/libgit2/fetch.c
+++ b/src/libgit2/fetch.c
@@ -174,10 +174,8 @@ int git_fetch_negotiate(git_remote *remote, const git_fetch_options *opts)
remote->need_pack = 0;
if (opts) {
- GIT_ASSERT_ARG(opts->unshallow == 0 || opts->depth == 0);
GIT_ASSERT_ARG(opts->depth >= 0);
-
- remote->nego.depth = opts->unshallow ? INT_MAX : opts->depth;
+ remote->nego.depth = opts->depth;
}
if (filter_wants(remote, opts) < 0)