path: root/config.c
diff options
authorShawn O. Pearce <>2006-12-23 07:33:35 (GMT)
committerJunio C Hamano <>2006-12-29 19:36:44 (GMT)
commit77ccc5bbd1bd403abd5f552be7210073bea856a6 (patch)
tree33d02d246bb50b1d91a15987e0466da21933ac36 /config.c
parent4d703a1a9016cd0a08994ddf7fc2f4739f223112 (diff)
Introduce new config option for mmap limit.
Rather than hardcoding the maximum number of bytes which can be mmapped from pack files we should make this value configurable, allowing the end user to increase or decrease this limit on a per-repository basis depending on the size of the repository and the capabilities of their operating system. In general users should not need to manually tune such a low-level setting within the core code, but being able to artifically limit the number of bytes which we can mmap at once from pack files will make it easier to craft test cases for the new mmap sliding window implementation. Signed-off-by: Shawn O. Pearce <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'config.c')
1 files changed, 5 insertions, 0 deletions
diff --git a/config.c b/config.c
index fcccf7e..0c21286 100644
--- a/config.c
+++ b/config.c
@@ -298,6 +298,11 @@ int git_default_config(const char *var, const char *value)
return 0;
+ if (!strcmp(var, "core.packedgitlimit")) {
+ packed_git_limit = git_config_int(var, value);
+ return 0;
+ }
if (!strcmp(var, "")) {
strlcpy(git_default_name, value, sizeof(git_default_name));
return 0;