From: Junio C Hamano <gitster@pobox.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org, "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: Re: [PATCH] test: make SYMLINKS prerequisite more robust
Date: Mon, 13 Feb 2023 10:07:27 -0800 [thread overview]
Message-ID: <xmqq7cwlcucg.fsf@gitster.g> (raw)
In-Reply-To: <ef19e164-b0ba-531d-95e6-75ef61c4fc9d@gmx.de> (Johannes Schindelin's message of "Mon, 13 Feb 2023 10:12:46 +0100 (CET)")
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>> Whatever magic you used to fix these failing tests, thanks.
>
> The magic was to pester the maintainers of the dependency of the
> `setup-git-for-windows-sdk` GitHub Action that broke said action.
>
> Background (you can skip this unless you're interested in details):
>
> Since Git's test suite relies so heavily on Unix shell
> scripting, which is really foreign on Windows, we have to use the MSYS2
> Bash to run it. And when I say "MSYS2 Bash", it is short-hand for "a Bash
> that uses the POSIX emulation layer provided by the MSYS2 runtime".
>
> The MSYS2 runtime _does_ have support for actual symbolic links, it just
> depends on certain Windows features (and then it still is not quite the
> same as Unix symbolic links because on Windows, the symbolic links are
> either pointing to files or to directories and you have to specify that
> when creating them).
OK, so bash runtime accidentally enabled symbolic links. But of
course "git" thinks that Windows never do symbolic links by having
{ENOSYS; return -1;} in compat/mingw.h for readlink and symlink,
running any git operation that depends on SYMLINKS prerequisite
would not work and that is where it fails. We do not even have to
hit a test that points a symbolic link at any special file.
Thanks for fixing the environment. The patch in the thread only
meant to ensure that the test suite does not get fooled by only bash
supporting symbolic links without updating "git" supporting any by
being more careful. Now "test -h" and "ln -s" behave without
contradiction with readlink(2)/symlink(2) emulation "git" uses, we
can safely drop it.
prev parent reply other threads:[~2023-02-13 18:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-08 19:40 [PATCH] test: make SYMLINKS prerequisite more robust Junio C Hamano
2023-02-08 23:09 ` Ævar Arnfjörð Bjarmason
2023-02-09 1:56 ` Junio C Hamano
2023-02-09 2:15 ` Ævar Arnfjörð Bjarmason
2023-02-09 22:54 ` Junio C Hamano
2023-02-10 17:31 ` Junio C Hamano
2023-02-10 19:39 ` Ævar Arnfjörð Bjarmason
2023-02-13 9:12 ` Johannes Schindelin
2023-02-13 18:07 ` Junio C Hamano [this message]
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq7cwlcucg.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).