diff options
| author | Nelson Elhage <nelhage@nelhage.com> | 2018-07-12 04:20:15 +0000 |
|---|---|---|
| committer | Nelson Elhage <nelhage@nelhage.com> | 2018-07-12 05:04:28 +0000 |
| commit | efe3f37d5fa3714263aca759126fd2e0a8a16370 (patch) | |
| tree | 6caa6761182847468e29cff62ad55351e3b90db7 /include/git2 | |
| parent | 912c59c9484ea364c61bcf067c470c8d7d74bbc2 (diff) | |
| download | libgit2-efe3f37d5fa3714263aca759126fd2e0a8a16370.tar.gz | |
Add a git_libgit2_opts option to set the max indexer object count
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 |
