git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/2] t9700: accommodate for MSYS2 Perl reporting as `cygwin`

From
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
Date
Sep 13, 2026, 19:11 UTC
Message-ID
<516441dd13710d5ea016fe1905e702314933e89a.1789326667.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.2227.git.1789326667.gitgitgadget@gmail.com>
From: Johannes Schindelin <johannes.schindelin@gmx.de>

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 <johannes.schindelin@gmx.de>
---
 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
Previous: Johannes Schindelin via GitGitGadgetNext: Johannes Schindelin via GitGitGadget
Message 2 of 3 in “mingw: fix perl related test failures”
  1. 0/2 mingw: fix perl related test failuresJohannes Schindelin via GitGitGadget, Sep 13, 2026
  2. 1/2 t9700: accommodate for MSYS2 Perl reporting as `cygwin`Johannes Schindelin via GitGitGadget, Sep 13, 2026
  3. 2/2 t9129: skip UTF-8 tests on WindowsJohannes Schindelin via GitGitGadget, Sep 13, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.