diff --git a/compat/mingw.c b/compat/mingw.c index 9c5417f4fb..34674c7b81 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -2260,6 +2260,15 @@ static void setup_windows_environment() if (!tmp && (tmp = getenv("USERPROFILE"))) setenv("HOME", tmp, 1); } + + /* + * Change 'core.symlinks' default to false, unless native symlinks are + * enabled in MSys2 (via 'MSYS=winsymlinks:nativestrict'). Thus we can + * run the test suite (which doesn't obey config files) with or without + * symlink support. + */ + if (!(tmp = getenv("MSYS")) || !strstr(tmp, "winsymlinks:nativestrict")) + has_symlinks = 0; } /*