There should have be git gc --repack-arguments
- From
Bagas Sanjaya <bagasdotme@gmail.com>
- Date
- Apr 7, 2021, 12:10 UTC
- Message-ID
- <b35a68a1-e693-5502-7a28-a1dd8222d3a0@gmail.com>
Hi,
I request that git gc should have --repack-arguments option. The value of this option should be passed to git repack.
The use case is when I have very large repos (such as GCC and Linux kernel) on a server with small RAM (1-2 GB). When doing gc on such repo, the repack step may hang because git-repack have to create single large packfile which can be larger than available memory (RAM+swap), so it must be necessary to do git repack --window-memory=<desired memory usage> --max-pack-size=<desired pack size> to create split and smaller packs instead.
There should also git config item gc.repackArguments, which have the same effect as git gc --repack-arguments, with the option takes precedence over the config.
-- An old man doll... just what I always wanted! - Clara