"shasum" is a Perl script. Pure MSYS2, in contrast to Git for Windows,
does not come with Perl by default, so fall back to using "sha256sum" on
Windows in general.
Quoting [1] for some background information:
"MSYS2 consists of three subsystems and their corresponding package
repositories, msys2, mingw32, and mingw64.
The mingw subsystems provide native Windows programs and are the main
focus of the project. These programs are built to co-operate well with
other Windows programs, independently of the other subsystems.
The msys2 subsystem provides an emulated mostly-POSIX-compliant
environment for building software, package management, and shell
scripting. These programs live in a virtual single-root filesystem (the
root is the MSYS2 installation directory). Some effort is made to have the
programs work well with native Windows programs, but it's not seamless.
[...]
Every subsystem has an associated "shell", which is essentially a set of
environment variables that allow the subsystems to co-operate properly.
These shells can be invoked using scripts in the MSYS2 installation
directory or shortcuts in the Start menu. The scripts set the MSYSTEM
variable and start a terminal emulator with bash. Bash in turn sources
/etc/profile which sets the environment depending on the value of
MSYSTEM."
[1] https://sourceforge.net/p/msys2/wiki/MSYS2%20introduction/
'git rev-parse' always reports absolute paths after resolving symlinks
but os.Getwd() and filepath.Abs() report paths without them resolved,
leading to issues. Also integration tests need to resolve symlinks before
comparing paths if running in a symlinked folder
We have to be able to convert from MinGW paths to native Windows paths,
and also to handle those paths in Bash without the '\' characters
escaping into tabs etc. This commit fixes the very first test in
test-env.sh as a proof of concept