Skip to content

Commit 2b6f1cd

Browse files
committed
mingw (t5580): document bug when cloning from backslashed UNC paths
Due to a quirk in Git's method to spawn git-upload-pack, there is a problem when passing paths with backslashes in them: Git will force the command-line through the shell, which has different quoting semantics in Git for Windows (being an MSYS2 program) than regular Win32 executables such as git.exe itself. The symptom is that the first of the two backslashes in UNC paths of the form \\myserver\folder\repository.git is *stripped off*. Document this bug by introducing a test case. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 093eb67 commit 2b6f1cd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

t/t5580-clone-push-unc.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ test_expect_success clone '
4949
git clone "file://$UNCPATH" clone
5050
'
5151

52+
test_expect_failure 'clone with backslashed path' '
53+
BACKSLASHED="$(echo "$UNCPATH" | tr / \\\\)" &&
54+
git clone "$BACKSLASHED" backslashed
55+
'
56+
5257
test_expect_success push '
5358
(
5459
cd clone &&

0 commit comments

Comments
 (0)