Skip to content

Commit

Permalink
mingw (t5580): document bug when cloning from backslashed UNC paths
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
dscho authored and jamill committed Sep 5, 2018
1 parent f55560c commit 04afc33
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions t/t5580-clone-push-unc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,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 &&
Expand Down

0 comments on commit 04afc33

Please sign in to comment.