Setup
- Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
I am using Portable Git 64-bit.
$ git --version --build-options
git version 2.19.1.windows.1
cpu: x86_64
built from commit: 11a3092e18f2201acd53e45aaa006f1601b6c02a
sizeof-long: 4
sizeof-size_t: 8
- Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
I am running 64-bit Windows 10 Insiders.
$ cmd.exe /c ver
Microsoft Windows [Version 10.0.18252.1000]
- What options did you set as part of the installation? Or did you choose the
defaults?
There are no options as part of a portable install.
- Any other interesting things about your environment that might be related
to the issue you're seeing?
Yes, 64-bit portable Git is incorrectly packaged. More details below.
Details
- Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other
PowerShell
$ git gc --keep-largest-pack --aggressive --prune=all
# then...
$ git count-objects -vH
# or
$ ls .\.git\objects\pack\*.pack
Note: There were no packfiles with a .keep extension.
- What did you expect to occur after running these commands?
One packfile remains in the repo.
- What actually happened instead?
Three packfiles remained, two which were just about 2 GiB, and one that was 443 MiB.
The problem probably is that PortableGit does not run the install scripts that unset pack.packSizeLimit.
This limit is set here:
https://github.com/git-for-windows/build-extra/blob/master/git-extra/gitconfig
The 64-bit installer unsets this configuration:
But this only runs in the InnoSetup install script.
The portable version does not get this run on it before it is packaged. Therefore:
$ git config --show-origin pack.packSizeLimit
file:C:/FULL_PATH_REDACTED/mingw64/etc/gitconfig 2g
- If the problem was occurring with a specific repository, can you provide the
URL to that repository to help us with testing?
N/A. This is a private repo. But this should reproduce with any sufficiently large repo.
Setup
I am using Portable Git 64-bit.
I am running 64-bit Windows 10 Insiders.
defaults?
There are no options as part of a portable install.
to the issue you're seeing?
Yes, 64-bit portable Git is incorrectly packaged. More details below.
Details
PowerShell
Minimal, Complete, and Verifiable example
this will help us understand the issue.
Note: There were no packfiles with a
.keepextension.One packfile remains in the repo.
Three packfiles remained, two which were just about 2 GiB, and one that was 443 MiB.
The problem probably is that PortableGit does not run the install scripts that unset
pack.packSizeLimit.This limit is set here:
https://github.com/git-for-windows/build-extra/blob/master/git-extra/gitconfig
The 64-bit installer unsets this configuration:
But this only runs in the InnoSetup install script.
The portable version does not get this run on it before it is packaged. Therefore:
URL to that repository to help us with testing?
N/A. This is a private repo. But this should reproduce with any sufficiently large repo.