diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2016-01-27 17:19:59 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-01-28 13:35:56 -0800 |
commit | fd318a941d8bb7cc832412f26a25313121cc0d21 (patch) | |
tree | bbbe827176ec39a691e9da6d1bcd58c483379fbd /csum-file.h | |
parent | mingw: fix t9700's assumption about directory separators (diff) | |
download | tgif-fd318a941d8bb7cc832412f26a25313121cc0d21.tar.xz |
mingw: work around pwd issues in the tests
In Git for Windows' SDK, the tests are run using a Bash that relies on
the POSIX emulation layer MSYS2 (itself a friendly fork of Cygwin). As
such, paths in tests can be POSIX paths. As soon as those paths are
passed to git.exe (which does *not* use the POSIX emulation layer),
those paths are converted into Windows paths, though. This happens
for command-line parameters, but not when reading, say, config variables.
To help with that, the `pwd` command is overridden to return the Windows
path of the current working directory when testing Git on Windows.
However, when talking to anything using the POSIX emulation layer, it is
really much better to use POSIX paths because Windows paths contain a
colon after the drive letter that will easily be mistaken for the common
separator in path lists.
So let's just use the $PWD variable when the POSIX path is needed.
This lets t7800-difftool.sh, t9400-git-cvsserver-server.sh,
t9402-git-cvsserver-refs.sh and t9401-git-cvsserver-crlf.sh pass in Git
for Windows' SDK.
Note: the cvsserver tests require not only the `cvs` package (install
it into Git for Windows' SDK via `pacman -S cvs`) but also the Perl
SQLite bindings (install them into Git for Windows' SDK via
`cpan DBD::SQLite`).
This patch is based on earlier work by 마누엘 and Karsten Blees.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'csum-file.h')
0 files changed, 0 insertions, 0 deletions