I had issues building Ruby as I was using git 2.30.
The error was:
> file2lastrev.rb: git rev-parse failed error: could not expand
> include path '~/.gitcinclude'
The default system git config includes paths making use of `$HOME`,
but that env variable gets removed when building: 7070b1b196/tool/lib/vcs.rb (L546-L547)
It works with git `>= 2.32` thanks to the `GIT_CONFIG_SYSTEM`
feature which gets set to a Null IO in order to override
the system gitconfig. 7070b1b196/tool/lib/vcs.rb (L549)