From ec06b09b1cc3632e6419933ea198c7ce03d77b05 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 19 Aug 2015 19:41:41 +0200 Subject: [PATCH] WIP: installer (64-bit): remove 2GB pack size limit TODO: test!!! In 64-bit setups it does not make sense to limit the pack size to 2GB. This fixes https://github.com/git-for-windows/git/issues/288. Signed-off-by: Johannes Schindelin --- installer/install.iss.in | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/installer/install.iss.in b/installer/install.iss.in index 379007d2f5..7a92ab8329 100644 --- a/installer/install.iss.in +++ b/installer/install.iss.in @@ -1352,6 +1352,28 @@ begin end; end; if FileExists(ProgramData + '\Git\config') then begin +#ifdef IS64 + FileName:=ExpandConstant('{tmp}')+'\packsize.txt'; + if not Exec(AppDir+'\{#MINGW_BITNESS}\bin\git.exe','config -f config pack.packsizelimit > "'+FileName+'"',SW_HIDE,ewWaitUntilTerminated,i) then begin + Msg:='Unable to read packsize limit'; + + // This is not a critical error, so just notify the user and continue. + SuppressibleMsgBox(Msg,mbError,MB_OK,IDOK); + Log(Msg); + end else if not LoadStringFromFile(FileName,PackSizeLimit) then begin + Msg:='Unable to read redirected packsize limit'; + // This is not a critical error, so just notify the user and continue. + SuppressibleMsgBox(Msg,mbError,MB_OK,IDOK); + Log(Msg); + end else if (PackSizeLimit='2g\n') and not Exec(AppDir+'\{#MINGW_BITNESS}\bin\git.exe','config -f config --unset pack.packsizelimit',SW_HIDE,ewWaitUntilTerminated,i) then begin + Msg:='Unable to unset packsize limit'; + + // This is not a critical error, so just notify the user and continue. + SuppressibleMsgBox(Msg,mbError,MB_OK,IDOK); + Log(Msg); + end; + DeleteFile(FileName); +#endif Cmd:='http.sslCAInfo "' + AppDir + '/{#MINGW_BITNESS}/ssl/certs/ca-bundle.crt"'; StringChangeEx(Cmd,'\','/',True); if not Exec(AppDir+'\{#MINGW_BITNESS}\bin\git.exe','config -f config '+Cmd,