Unverified Commit 79ed94e0 by Laurence McGlashan Committed by GitHub

Apply suggestions from code review

Co-authored-by: Qix <Qix-@users.noreply.github.com>
parent 1cc2979a
......@@ -744,9 +744,9 @@ typedef struct {
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;
......
......@@ -359,7 +359,7 @@ static int cap_not_sup_err(const char *cap_name)
/* Disables server capabilities we're not interested in */
static int setup_caps(transport_smart_caps *caps, const git_fetch_negotiation *wants)
{
if (wants->depth) {
if (wants->depth > 0) {
if (!caps->shallow)
return cap_not_sup_err(GIT_CAP_SHALLOW);
} 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