diff options
Diffstat (limited to 'include/git2')
| -rw-r--r-- | include/git2/common.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/include/git2/common.h b/include/git2/common.h index 8c9347413..e5fff0650 100644 --- a/include/git2/common.h +++ b/include/git2/common.h @@ -195,7 +195,9 @@ typedef enum { GIT_OPT_SET_WINDOWS_SHAREMODE, GIT_OPT_ENABLE_STRICT_HASH_VERIFICATION, GIT_OPT_SET_ALLOCATOR, - GIT_OPT_ENABLE_UNSAVED_INDEX_SAFETY + GIT_OPT_ENABLE_UNSAVED_INDEX_SAFETY, + GIT_OPT_GET_INDEXER_MAX_OBJECTS, + GIT_OPT_SET_INDEXER_MAX_OBJECTS } git_libgit2_opt_t; /** @@ -372,6 +374,18 @@ typedef enum { * > fail. (Using the FORCE flag to checkout will still overwrite * > these changes.) * + * opts(GIT_OPT_GET_INDEXER_MAX_OBJECTS, size_t *out) + * + * > Get the maximum number of objects libgit2 will allow in a pack + * > file when downloading a pack file from a remote. This can be + * > used to limit maximum memory usage when fetching from an untrusted + * > remote. + * + * opts(GIT_OPT_SET_INDEXER_MAX_OBJECTS, size_t objects) + * + * > Set the maximum number of objects libgit2 will allow in a pack + * > file when downloading a pack file from a remote. + * * @param option Option key * @param ... value to set the option * @return 0 on success, <0 on failure |
