From 2e8b5078e3f1d35a7f7fb15f4d0465b46f161799 Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Wed, 7 Sep 2016 22:04:32 -0700 Subject: [PATCH] git-shell-verify: synchronize settings with shlib.sh Since git-shell-verify runs in the jail it does not have access to shlib.sh and therefore replicates a few settings that are pertinent. Synchronize those settings with previous changes to shlib.sh that overlooked the needed corresponding git-shell-verify changes. Signed-off-by: Kyle J. McKay --- bin/git-shell-verify | 13 +++++++++++++ install.sh | 2 ++ 2 files changed, 15 insertions(+) diff --git a/bin/git-shell-verify b/bin/git-shell-verify index 262450d..96f283a 100755 --- a/bin/git-shell-verify +++ b/bin/git-shell-verify @@ -39,6 +39,8 @@ mob=@mob@ webadmurl=@webadmurl@ ua=@git_server_ua@ defined_ua=@defined_git_server_ua@ +cfg_git_no_mmap=@git_no_mmap@ +var_big_file_threshold=@big_file_threshold@ export XDG_CONFIG_HOME export HOME @@ -55,6 +57,17 @@ if [ -n "$defined_ua" ]; then GIT_HTTP_USER_AGENT="$ua" export GIT_HTTP_USER_AGENT fi +unset GIT_CONFIG_PARAMETERS +git_add_config "core.ignoreCase=false" +if [ -n "$cfg_git_no_mmap" ]; then + # Just like compiling with NO_MMAP + git_add_config "core.packedGitWindowSize=1m" +else + # Always use the 32-bit default (32m) even on 64-bit to avoid memory blowout + git_add_config "core.packedGitWindowSize=32m" +fi +[ -z "$var_big_file_threshold" ] || + git_add_config "core.bigFileThreshold=$var_big_file_threshold" # Only the following commands are allowed: # diff --git a/install.sh b/install.sh index 796d294..936d2d2 100755 --- a/install.sh +++ b/install.sh @@ -315,7 +315,9 @@ perl -I. -M$GIROCCO_CONF -i -p \ -e 's/\@mob\@/"$Girocco::Config::mob"/g;' \ -e 's/\@git_server_ua\@/"$Girocco::Config::git_server_ua"/g;' \ -e 's/\@defined_git_server_ua\@/defined($Girocco::Config::git_server_ua)/ge;' \ + -e 's/\@git_no_mmap\@/"$Girocco::Config::git_no_mmap"/g;' \ -e 's/\@var_xargs_r\@/"'"$var_xargs_r"'"/g;' \ + -e 's/\@big_file_threshold\@/"'"$var_big_file_threshold"'"/g;' \ -e 'close ARGV if eof;' \ "$cfg_basedir"/jobs/*.sh "$cfg_basedir"/jobd/*.sh \ "$cfg_basedir"/taskd/*.sh "$cfg_basedir"/gitweb/*.sh \ -- 2.11.4.GIT