Skip to content

Commit fe79ec9

Browse files
committed
t9390: work around yet another Unix<->Win32 path issue
On Windows, there is no absolute path `/fake/path`, but MSYS2 (which Git for Windows uses e.g. for running Bash scripts) pretends that it exists. This only works within MSYS2 applications, of course, so... when MSYS2 sees that we hand a parameter to a non-MSYS2 application in a shell script, it helpfully converts it to the full path (prepending MSYS2's pseudo root directory). Let's work around that by using a Win32-compatible path to begin with: `$(pwd)` produces that on Windows. On other platforms, it still works. As a bonus, this safe-guards our test against a setup where `/fake/path` _actually exists_. Stranger things have been seen in the wild, after all. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 848cd65 commit fe79ec9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

t/t9390-filter-repo.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1291,8 +1291,9 @@ test_expect_success 'mailmap sanity checks' '
12911291
git clone file://"$(pwd)"/analyze_me mailmap_sanity_checks &&
12921292
cd mailmap_sanity_checks &&
12931293
1294-
test_must_fail git filter-repo --mailmap /fake/path 2>../err &&
1295-
test_i18ngrep "Cannot read /fake/path" ../err &&
1294+
fake=$(pwd)/fake &&
1295+
test_must_fail git filter-repo --mailmap "$fake"/path 2>../err &&
1296+
test_i18ngrep "Cannot read $fake/path" ../err &&
12961297
12971298
echo "Total Bogus" >../whoopsies &&
12981299
test_must_fail git filter-repo --mailmap ../whoopsies 2>../err &&

0 commit comments

Comments
 (0)