Fix Windows' git longpath setting

A long time ago, we had issues with Git for Windows installing to C:\Program Files\Git directory.

A fix for this was to --unset-all include.path. For whatever reason, I concluded that the fix also needed $env:GIT_CONFIG_NOSYSTEM=1. (https://github.com/git-for-windows/git/issues/2387#issuecomment-679367609).

The solution we used was:

$env:GIT_CONFIG_NOSYSTEM=1
git.exe config --system --unset-all include.path
git.exe config --system core.longpaths true

This worked for quite a long time.

In 17.8, we copied these settings over to our new base-image repository, and we're getting reports that this is now broken.

On reflection, it's weird that we're setting GIT_CONFIG_NOSYSTEM=1 and then immediately setting config at the system level.

I don't know why this used to work, perhaps it relates to a change in Git itself (as we also updated the version of git). But removing GIT_CONFIG_NOSYSTEM=1 now appears to be the fix.

Fixes:

Edited by Axel von Bertoldi

Merge request reports

Loading