Skip to content

Commit 13b57da

Browse files
dschogitster
authored andcommitted
mingw: verify that paths are not mistaken for remote nicknames
This added test case simply verifies that users will not be bothered with bogus complaints à la warning: unable to access '.git/remotes/D:\repo': Invalid argument when fetching from a Windows path (in this case, D:\repo). [j6t: mark the new test as test_expect_failure] Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Johannes Sixt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 15d980a commit 13b57da

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

t/t5580-clone-push-unc.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/bin/sh
22

3-
test_description='various UNC path tests (Windows-only)'
3+
test_description='various Windows-only path tests'
44
. ./test-lib.sh
55

66
if ! test_have_prereq MINGW; then
7-
skip_all='skipping UNC path tests, requires Windows'
7+
skip_all='skipping Windows-only path tests'
88
test_done
99
fi
1010

@@ -45,4 +45,10 @@ test_expect_success push '
4545
test "$rev" = "$(git rev-parse --verify refs/heads/to-push)"
4646
'
4747

48+
test_expect_failure 'remote nick cannot contain backslashes' '
49+
BACKSLASHED="$(pwd | tr / \\\\)" &&
50+
git ls-remote "$BACKSLASHED" >out 2>err &&
51+
test_i18ngrep ! "unable to access" err
52+
'
53+
4854
test_done

0 commit comments

Comments
 (0)