]> git.ipfire.org Git - thirdparty/git.git/commitdiff
mingw (t5580): document bug when cloning from backslashed UNC paths
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Thu, 17 Jan 2019 20:14:47 +0000 (12:14 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 18 Jan 2019 21:12:14 +0000 (13:12 -0800)
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>
t/t5580-clone-push-unc.sh

index ba548df4a918243ee1b2bcedab525e6ec7eff7d6..c3703765f47d19214ec00c2d4c6e71b5dfc05fa7 100755 (executable)
@@ -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 &&