mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
Apply suggestions from code review
Co-authored-by: Qix <Qix-@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
1cc2979a71
commit
79ed94e0f8
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user