summaryrefslogtreecommitdiff
path: root/include/git2/remote.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/git2/remote.h')
-rw-r--r--include/git2/remote.h22
1 files changed, 13 insertions, 9 deletions
diff --git a/include/git2/remote.h b/include/git2/remote.h
index 8d6127014..e9065b250 100644
--- a/include/git2/remote.h
+++ b/include/git2/remote.h
@@ -702,6 +702,15 @@ typedef enum {
GIT_REMOTE_DOWNLOAD_TAGS_ALL
} git_remote_autotag_option_t;
+/** Constants for fetch depth (shallowness of fetch). */
+typedef enum {
+ /** The fetch is "full" (not shallow). This is the default. */
+ GIT_FETCH_DEPTH_FULL = 0,
+
+ /** The fetch should "unshallow" and fetch missing data. */
+ GIT_FETCH_DEPTH_UNSHALLOW = 2147483647
+} git_fetch_depth_t;
+
/**
* Fetch options structure.
*
@@ -744,20 +753,15 @@ typedef struct {
git_proxy_options proxy_opts;
/**
- * Depth of the fetch to perform, or 0 for full history.
+ * Depth of the fetch to perform, or `GIT_FETCH_DEPTH_FULL`
+ * (or `0`) for full history, or `GIT_FETCH_DEPTH_UNSHALLOW`
+ * to "unshallow" a shallow repository.
*
- * The default is 0.
+ * The default is full (`GIT_FETCH_DEPTH_FULL` or `0`).
*/
int depth;
/**
- * Convert a shallow repository to a full repository.
- *
- * The default is 0, which means the flag is off.
- */
- int unshallow;
-
- /**
* Whether to allow off-site redirects. If this is not
* specified, the `http.followRedirects` configuration setting
* will be consulted.