From: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Johannes Schindelin <johannes.schindelin@gmx.de>,
Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: [PATCH 1/2] t9700: accommodate for MSYS2 Perl reporting as `cygwin`
Date: Sun, 13 Sep 2026 19:11:06 +0000 [thread overview]
Message-ID: <516441dd13710d5ea016fe1905e702314933e89a.1789326667.git.gitgitgadget@gmail.com> (raw)
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
next prev parent reply other threads:[~2026-09-13 19:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-13 19:11 [PATCH 0/2] mingw: fix perl related test failures Johannes Schindelin via GitGitGadget
2026-09-13 19:11 ` Johannes Schindelin via GitGitGadget [this message]
2026-09-13 19:11 ` [PATCH 2/2] t9129: skip UTF-8 tests on Windows Johannes Schindelin via GitGitGadget
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=516441dd13710d5ea016fe1905e702314933e89a.1789326667.git.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=johannes.schindelin@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.