From: Johannes Schindelin via GitGitGadget Date: Sun, 13 Sep 2026 19:11:06 GMT Subject: [PATCH 1/2] t9700: accommodate for MSYS2 Perl reporting as `cygwin` Message-ID: <516441dd13710d5ea016fe1905e702314933e89a.1789326667.git.gitgitgadget@gmail.com> In-Reply-To: From: Johannes Schindelin As of a year or two ago, there is this push to align MSYS2 more closely with Cygwin, so as to benefit from a closer collaboration. Part of that is that the triplet `x86_64-pc-cygwin` is used nowadays, whereas it had been `x86_64-pc-msys` previously. Likewise, Perl now reports `$^O` as `cygwin` instead of `msys`. The Perl module test used `msys` as tell-tale when to accommodate for a native Windows version of `git.exe` which would report absolute _Windows_ paths rather than those pseudo-Unix paths. We cannot use that tell-tale anymore, and we also cannot adjust it to `cygwin` because that would break in Cygwin (where `git.exe` reports absolute pseudo-Unix paths). Let's use the environment variable `MSYSTEM` instead (being mindful that the `MSYSTEM=MSYS` variant would _also_ reflect a setup where `git.exe` won't report absolute _Windows_ paths). Signed-off-by: Johannes Schindelin --- t/t9700/test.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t9700/test.pl b/t/t9700/test.pl index f83e6169e2..43a6dc266e 100755 --- a/t/t9700/test.pl +++ b/t/t9700/test.pl @@ -118,7 +118,7 @@ unlink $tmpfile; # paths my $abs_git_dir = $abs_repo_dir . "/.git"; -if ($^O eq 'msys') { +if (defined $ENV{MSYSTEM} && $ENV{MSYSTEM} ne 'MSYS') { $abs_git_dir = `cygpath -am "$abs_repo_dir/.git"`; $abs_git_dir =~ s/\r?\n?$//; } -- gitgitgadget