From 848cd652f049e0f5c7447873d4ed3e6a041d9ea6 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Thu, 22 Oct 2020 00:03:57 +0200 Subject: [PATCH] t9390: work around clash with MSYS2's Unix<->Win32 path conversion MSYS2 tries to be very helpful, and in most cases it even works, by converting parameters passed from inside an MSYS2 Bash to a non-MSYS2 application (such as `git.exe`) if they look like Unix-style paths or path lists. Sometimes, however, this automatic path conversion is unhelpful, e.g. when passing the parameter `foo:.` to Git, which MSYS2 will readily convert to a Windows-style path list: `foo;bar` (i.e. using a semicolon instead of a colon). Happily, there is a way to avoid that: the `MSYS_NO_PATHCONV` variable. Let's use it. Signed-off-by: Johannes Schindelin --- t/t9390-filter-repo.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/t/t9390-filter-repo.sh b/t/t9390-filter-repo.sh index 61c7efa..01a6966 100755 --- a/t/t9390-filter-repo.sh +++ b/t/t9390-filter-repo.sh @@ -1197,6 +1197,12 @@ test_expect_success 'startup sanity checks' ' test_expect_success 'other startup error cases and requests for help' ' ( + # prevent MSYS2 (Git for Windows) from converting the colon to + # a semicolon when encountering parameters that look like + # Unix-style, colon-separated path lists (such as `foo:.`) + MSYS_NO_PATHCONV=1 && + export MSYS_NO_PATHCONV + git init startup_errors && cd startup_errors &&