Allow bypassing check '.keep' files using libgit2 option 'GIT_OPT_IGNORE_PACK_KEEP_FILE_CHECK'

This commit is contained in:
Dhruva Krishnamurthy
2019-01-28 18:31:21 -08:00
parent 1a107fac0f
commit 004a339874
4 changed files with 29 additions and 4 deletions

View File

@@ -205,7 +205,8 @@ typedef enum {
GIT_OPT_SET_ALLOCATOR,
GIT_OPT_ENABLE_UNSAVED_INDEX_SAFETY,
GIT_OPT_GET_PACK_MAX_OBJECTS,
GIT_OPT_SET_PACK_MAX_OBJECTS
GIT_OPT_SET_PACK_MAX_OBJECTS,
GIT_OPT_DISABLE_PACK_KEEP_FILE_CHECKS
} git_libgit2_opt_t;
/**
@@ -395,6 +396,10 @@ typedef enum {
* > Set the maximum number of objects libgit2 will allow in a pack
* > file when downloading a pack file from a remote.
*
* opts(GIT_OPT_DISABLE_PACK_KEEP_FILE_CHECKS, int enabled)
* > This will cause .keep file existence checks to be skipped when
* > accessing packfiles, which can help performance with remote filesystems.
*
* @param option Option key
* @param ... value to set the option
* @return 0 on success, <0 on failure