summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2023-04-25 09:31:34 +0100
committerEdward Thomson <ethomson@edwardthomson.com>2023-05-08 15:06:41 +0100
commit3388f5ba1b821e9683d21ca41c34ed752d2db222 (patch)
tree4657ecd30c87c40b66a8be7339e9507e627f58af /include
parent7d7f3059decbd6b4730bfd09da54726c1b3ed8ea (diff)
downloadlibgit2-3388f5ba1b821e9683d21ca41c34ed752d2db222.tar.gz
shallow: don't default to -1 for depth
Depth of `0` should indicate full depth. Disallow negative values (they may have a future meaning) and use `0` as the default.
Diffstat (limited to 'include')
-rw-r--r--include/git2/remote.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/git2/remote.h b/include/git2/remote.h
index 9e4043f87..8d6127014 100644
--- a/include/git2/remote.h
+++ b/include/git2/remote.h
@@ -744,9 +744,9 @@ typedef struct {
git_proxy_options proxy_opts;
/**
- * Depth of the fetch to perform. Depth <= 0 fetches the full history.
+ * Depth of the fetch to perform, or 0 for full history.
*
- * The default is -1.
+ * The default is 0.
*/
int depth;
@@ -772,7 +772,7 @@ typedef struct {
#define GIT_FETCH_OPTIONS_VERSION 1
#define GIT_FETCH_OPTIONS_INIT { GIT_FETCH_OPTIONS_VERSION, GIT_REMOTE_CALLBACKS_INIT, GIT_FETCH_PRUNE_UNSPECIFIED, 1, \
- GIT_REMOTE_DOWNLOAD_TAGS_UNSPECIFIED, GIT_PROXY_OPTIONS_INIT, -1, 0 }
+ GIT_REMOTE_DOWNLOAD_TAGS_UNSPECIFIED, GIT_PROXY_OPTIONS_INIT }
/**
* Initialize git_fetch_options structure