summaryrefslogtreecommitdiff
path: root/include/git2/common.h
diff options
context:
space:
mode:
authorVicent Martí <vicent@github.com>2013-03-26 11:05:57 -0700
committerVicent Martí <vicent@github.com>2013-03-26 11:05:57 -0700
commit0b061b5bfacda1a820d159d9e48521d3da4aa088 (patch)
tree81e0ffea9d2def0b4834442f4c873b4d727495bc /include/git2/common.h
parent86d24ce40c5ccf8783e156ebe8872aee3b97cc49 (diff)
parentf5e28202cb8d73a444e5a5664420fbe5bec11119 (diff)
downloadlibgit2-0b061b5bfacda1a820d159d9e48521d3da4aa088.tar.gz
Merge pull request #1436 from schu/opts-cache-size
opts: allow configuration of odb cache size
Diffstat (limited to 'include/git2/common.h')
-rw-r--r--include/git2/common.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/git2/common.h b/include/git2/common.h
index b8c3e42ce..5318e66b7 100644
--- a/include/git2/common.h
+++ b/include/git2/common.h
@@ -131,6 +131,8 @@ enum {
GIT_OPT_SET_MWINDOW_MAPPED_LIMIT,
GIT_OPT_GET_SEARCH_PATH,
GIT_OPT_SET_SEARCH_PATH,
+ GIT_OPT_GET_ODB_CACHE_SIZE,
+ GIT_OPT_SET_ODB_CACHE_SIZE,
};
/**
@@ -167,6 +169,15 @@ enum {
* - `level` must be GIT_CONFIG_LEVEL_SYSTEM, GIT_CONFIG_LEVEL_GLOBAL,
* or GIT_CONFIG_LEVEL_XDG.
*
+ * opts(GIT_OPT_GET_ODB_CACHE_SIZE):
+ * Get the size of the libgit2 odb cache.
+ *
+ * opts(GIT_OPT_SET_ODB_CACHE_SIZE):
+ * Set the size of the of the libgit2 odb cache. This needs
+ * to be done before git_repository_open is called, since
+ * git_repository_open initializes the odb layer. Defaults
+ * to 128.
+ *
* @param option Option key
* @param ... value to set the option
* @return 0 on success, <0 on failure