mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
Add a git_libgit2_opts option to set the max indexer object count
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user