Commit e3bf6db5 by lmcglash

Merge branch 'shallow-clone-network' of https://github.com/mathworks/libgit2…

Merge branch 'shallow-clone-network' of https://github.com/mathworks/libgit2 into shallow-clone-network
parents d9357737 79ed94e0
...@@ -744,9 +744,9 @@ typedef struct { ...@@ -744,9 +744,9 @@ typedef struct {
git_proxy_options proxy_opts; git_proxy_options proxy_opts;
/** /**
* Depth of the fetch to perform, has to be a positive integer. * Depth of the fetch to perform. Depth <= 0 fetches the full history.
* *
* The default is -1, which will fetch the full history. * The default is -1.
*/ */
int depth; int depth;
......
...@@ -359,7 +359,7 @@ static int cap_not_sup_err(const char *cap_name) ...@@ -359,7 +359,7 @@ static int cap_not_sup_err(const char *cap_name)
/* Disables server capabilities we're not interested in */ /* Disables server capabilities we're not interested in */
static int setup_caps(transport_smart_caps *caps, const git_fetch_negotiation *wants) static int setup_caps(transport_smart_caps *caps, const git_fetch_negotiation *wants)
{ {
if (wants->depth) { if (wants->depth > 0) {
if (!caps->shallow) if (!caps->shallow)
return cap_not_sup_err(GIT_CAP_SHALLOW); return cap_not_sup_err(GIT_CAP_SHALLOW);
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment