summaryrefslogtreecommitdiff
path: root/t/t5580-clone-push-unc.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2019-01-17 20:14:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-01-18 21:12:14 (GMT)
commit5440df44c268e718a79a35df6f5d912b21b73ffa (patch)
tree8307ef1c05bcddba3b1ec3e6484c76f165bcf8ca /t/t5580-clone-push-unc.sh
parent77556354bb7ac50450e3b28999e3576969869068 (diff)
downloadgit-5440df44c268e718a79a35df6f5d912b21b73ffa.zip
git-5440df44c268e718a79a35df6f5d912b21b73ffa.tar.gz
git-5440df44c268e718a79a35df6f5d912b21b73ffa.tar.bz2
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 <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5580-clone-push-unc.sh')
-rwxr-xr-xt/t5580-clone-push-unc.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/t/t5580-clone-push-unc.sh b/t/t5580-clone-push-unc.sh
index ba548df..c370376 100755
--- a/t/t5580-clone-push-unc.sh
+++ b/t/t5580-clone-push-unc.sh
@@ -40,6 +40,11 @@ test_expect_success clone '
git clone "file://$UNCPATH" clone
'
+test_expect_failure 'clone with backslashed path' '
+ BACKSLASHED="$(echo "$UNCPATH" | tr / \\\\)" &&
+ git clone "$BACKSLASHED" backslashed
+'
+
test_expect_success push '
(
cd clone &&