Skip to content

mingw: fix perl related test failures - #2227

Closed
dscho wants to merge 2 commits into
gitgitgadget:masterfrom
dscho:fix-perl-related-test-failures-on-windows
Closed

dscho wants to merge 2 commits into
gitgitgadget:masterfrom
dscho:fix-perl-related-test-failures-on-windows

Conversation

@dscho

@dscho dscho commented Sep 13, 2026

Copy link
Copy Markdown
Member

For performance reasons (and also because we retired support for git svn in Git for Windows), Perl-related tests are skipped from the CI builds. As can be expected, this caused some bit-rot.

While this is not exactly -rc1 material, in preparing for Git for Windows v2.56.0-rc0 I did run the entire test suite on Windows/ARM64 and these were the only two bugs that needed fixing.

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>
The assumption of this test is that Perl and Git have the same idea how
to perform encoding conversions.

However, in Git for Windows, Git is a native Win32 program, and such
programs have a very different concept of encodings (called "Code
Pages", and they are not controlled via environment variables at all),
whereas the Perl interpreter used in Git for Windows is a pseudo-Unix
one that uses the MSYS2 runtime (which _does_ try very much to abide by
Unix' `LC_ALL` and friends, and totally ignores Windows' current or
active code pages).

As such, these test cases _cannot_ work with Git for Windows. So let's
just skip them on that platform.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho
dscho force-pushed the fix-perl-related-test-failures-on-windows branch from ebb2ecf to 8d065f1 Compare September 13, 2026 18:00
@dscho

dscho commented Sep 13, 2026

Copy link
Copy Markdown
Member Author

/submit

@gitgitgadget

gitgitgadget Bot commented Sep 13, 2026

Copy link
Copy Markdown

Submitted as pull.2227.git.1789326667.gitgitgadget@gmail.com

To fetch this version into FETCH_HEAD:

git fetch https://github.com/gitgitgadget/git/ pr-2227/dscho/fix-perl-related-test-failures-on-windows-v1

To fetch this version to local tag pr-2227/dscho/fix-perl-related-test-failures-on-windows-v1:

git fetch --no-tags https://github.com/gitgitgadget/git/ tag pr-2227/dscho/fix-perl-related-test-failures-on-windows-v1

@gitgitgadget

gitgitgadget Bot commented Sep 14, 2026

Copy link
Copy Markdown

This branch is now known as js/mingw-test-fixes-around-perl.

@gitgitgadget

gitgitgadget Bot commented Sep 14, 2026

Copy link
Copy Markdown

This patch series was integrated into seen via git@021df6f.

@gitgitgadget

gitgitgadget Bot commented Sep 14, 2026

Copy link
Copy Markdown

This patch series was integrated into next via git@c797ae1.

@gitgitgadget

gitgitgadget Bot commented Sep 14, 2026

Copy link
Copy Markdown

There was a status update in the "New Topics" section about the branch js/mingw-test-fixes-around-perl on the Git mailing list:

Correct tests that depend on Perl running on MinGW

Will merge to 'master'.
source: <pull.2227.git.1789326667.gitgitgadget@gmail.com>

@gitgitgadget

gitgitgadget Bot commented Sep 15, 2026

Copy link
Copy Markdown

This patch series was integrated into master via git@6fc1571.

@gitgitgadget gitgitgadget Bot added the master label Sep 15, 2026
@gitgitgadget gitgitgadget Bot closed this Sep 15, 2026
@gitgitgadget

gitgitgadget Bot commented Sep 15, 2026

Copy link
Copy Markdown

Congratulations! 🎉 Your patch series was merged into upstream via 6fc1571.

Note: this pull request will show as "Closed" rather than "Merged" because the merge happened in the upstream repository, not on GitHub. This is expected — your contribution has been accepted!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant