{"thread":{"id":"40748","subject":"Bug: t5813 failing on Cygwin","startedAt":"2015-11-07T12:11:29Z","lastAt":"2015-11-09T17:50:26Z","messageCount":16,"participants":["Adam Dinwoodie","Jeff King","Dennis Kaarsemaker","Ramsay Jones","Torsten Bögershausen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"273048","messageId":"563DEA71.1080808@dinwoodie.org","threadId":"40748","inReplyTo":null,"subject":"Bug: t5813 failing on Cygwin","fromName":"Adam Dinwoodie","fromEmail":"adam@dinwoodie.org","sentAt":"2015-11-07T12:11:29Z","receivedAt":"2015-11-07T12:11:29Z","isPatch":false,"sender":{"key":"adam@dinwoodie.org","avatar":"https://avatars.githubusercontent.com/u/1397507?v=4"},"body":"In the process of pulling up the Cygwin Git release from v2.5.3, I've \ndiscovered t5813 is failing, and appears to have been failing since it \nwas first introduced in a5adace.\n\nI've not yet done any significant digging into the problem myself; I'm \nreporting here now in case in the hope someone else will have a better \nidea what's going on.\n\nSpecifically, I'm seeing t5813 subtests 9-13 and 15-19 failing. This \nhappens with a clean build straight from the Git source tree (git clean \n-dfx && make configure && ./configure && make && cd t && \n./t5813-proto-disable-ssh.sh) as well as builds using the Cygwin \npackaging paraphernalia.\n\nAdam\n"},{"id":"273050","messageId":"20151107184527.GA4483@sigill.intra.peff.net","threadId":"40748","inReplyTo":"563DEA71.1080808@dinwoodie.org","subject":"Re: Bug: t5813 failing on Cygwin","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-11-07T18:45:27Z","receivedAt":"2015-11-07T18:45:27Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Nov 07, 2015 at 12:11:29PM +0000, Adam Dinwoodie wrote:\n\n> Specifically, I'm seeing t5813 subtests 9-13 and 15-19 failing. This happens\n> with a clean build straight from the Git source tree (git clean -dfx && make\n> configure && ./configure && make && cd t && ./t5813-proto-disable-ssh.sh) as\n> well as builds using the Cygwin packaging paraphernalia.\n\nWhat does the output of \"./t5813-proto-disable-ssh.sh -v -i\" show?\n\nIt seems strange that it would fail only on Cygwin; this code doesn't\nreally use any platform-dependent features. It's also weird that it\nfails _only_ for ssh, and _only_ on the tests that are using \"ssh://\"\nURLs are not \"host:path\" syntax.\n\nI tried building on Linux with the Cygwin build knobs found in\nconfig.mak.uname, but I couldn't get it to fail. I also wondered if the\ntest was doing something with the shell that might not be portable, but\nI don't see anything interesting.\n\n-Peff\n"},{"id":"273051","messageId":"20151107192029.GW14466@dinwoodie.org","threadId":"40748","inReplyTo":"20151107184527.GA4483@sigill.intra.peff.net","subject":"Re: Bug: t5813 failing on Cygwin","fromName":"Adam Dinwoodie","fromEmail":"adam@dinwoodie.org","sentAt":"2015-11-07T19:20:29Z","receivedAt":"2015-11-07T19:20:29Z","isPatch":false,"sender":{"key":"adam@dinwoodie.org","avatar":"https://avatars.githubusercontent.com/u/1397507?v=4"},"body":"On Sat, Nov 07, 2015 at 01:45:27PM -0500, Jeff King wrote:\n> On Sat, Nov 07, 2015 at 12:11:29PM +0000, Adam Dinwoodie wrote:\n> \n> > Specifically, I'm seeing t5813 subtests 9-13 and 15-19 failing. This happens\n> > with a clean build straight from the Git source tree (git clean -dfx && make\n> > configure && ./configure && make && cd t && ./t5813-proto-disable-ssh.sh) as\n> > well as builds using the Cygwin packaging paraphernalia.\n> \n> What does the output of \"./t5813-proto-disable-ssh.sh -v -i\" show?\n> \n> It seems strange that it would fail only on Cygwin; this code doesn't\n> really use any platform-dependent features. It's also weird that it\n> fails _only_ for ssh, and _only_ on the tests that are using \"ssh://\"\n> URLs are not \"host:path\" syntax.\n\nAh!  I thought I'd checked that already, but looking at the output now I\ncan see what's going wrong.  Cutting down to the relevant error:\n\n    ssh: remote git-upload-pack '//home/Adam/vcs/Cygwin-Git/git-2.6.2-1.x86_64/build/t/trash directory.t5813-proto-disable-ssh/remote/repo.git' fatal: '//home/Adam/vcs/Cygwin-Git/git-2.6.2-1.x86_64/build/t/trash directory.t5813-proto-disable-ssh/remote/repo.git' does not appear to be a git repository\n\nNote the '//' at the start of the path -- on most *nix systems '//' is\neffectively identical to '/'.  On Cygwin, however, '//' is used to\naccess Windows UNC paths: what Windows calls \"\\\\server\\share\", Cygwin\ncalls \"//server/share\".  If you replace the '//' with '/' you get the\nlocatoin of the repository; but here Cygwin is looking for the\nrepository in a share called \"Adam\" on a network server called \"home\"...\n\nI suspect the correct fix here is to fix whatever's causing Git to\ngenerate a path with that '//'.  If nobody else gets to it soon\n(probably on the order of a week before I'll get the chance), I'll go\ncode diving and submit a patch.\n\n> I tried building on Linux with the Cygwin build knobs found in\n> config.mak.uname, but I couldn't get it to fail. I also wondered if the\n> test was doing something with the shell that might not be portable, but\n> I don't see anything interesting.\n\nIf I recall correctly, the correct interpretation of '//' isn't defined\nin POSIX, so whatever's causing that path to be generated is the bit\nthat's not fully portable.  It looks as though t5813 throwing this up is\njust a coincidence rather than it being particularly related to the\nfunction those tests are actually testing.\n\nAdam\n"},{"id":"273052","messageId":"1446930165.16957.9.camel@kaarsemaker.net","threadId":"40748","inReplyTo":"20151107192029.GW14466@dinwoodie.org","subject":"Re: Bug: t5813 failing on Cygwin","fromName":"Dennis Kaarsemaker","fromEmail":"dennis@kaarsemaker.net","sentAt":"2015-11-07T21:02:45Z","receivedAt":"2015-11-07T21:02:45Z","isPatch":false,"sender":{"key":"dennis@kaarsemaker.net","avatar":"https://avatars.githubusercontent.com/u/200649?v=4"},"body":"On za, 2015-11-07 at 19:20 +0000, Adam Dinwoodie wrote:\n> On Sat, Nov 07, 2015 at 01:45:27PM -0500, Jeff King wrote:\n> > On Sat, Nov 07, 2015 at 12:11:29PM +0000, Adam Dinwoodie wrote:\n> > \n> > > Specifically, I'm seeing t5813 subtests 9-13 and 15-19 failing.\n> > > This happens\n> > > with a clean build straight from the Git source tree (git clean \n> > > -dfx && make\n> > > configure && ./configure && make && cd t && ./t5813-proto-disable\n> > > -ssh.sh) as\n> > > well as builds using the Cygwin packaging paraphernalia.\n> > \n> > What does the output of \"./t5813-proto-disable-ssh.sh -v -i\" show?\n> > \n> > It seems strange that it would fail only on Cygwin; this code\n> > doesn't\n> > really use any platform-dependent features. It's also weird that it\n> > fails _only_ for ssh, and _only_ on the tests that are using\n> > \"ssh://\"\n> > URLs are not \"host:path\" syntax.\n> \n> Ah!  I thought I'd checked that already, but looking at the output\n> now I\n> can see what's going wrong.  Cutting down to the relevant error:\n> \n>     ssh: remote git-upload-pack '//home/Adam/vcs/Cygwin-Git/git-2.6.2\n> -1.x86_64/build/t/trash directory.t5813-proto-disable\n> -ssh/remote/repo.git' fatal: '//home/Adam/vcs/Cygwin-Git/git-2.6.2\n> -1.x86_64/build/t/trash directory.t5813-proto-disable\n> -ssh/remote/repo.git' does not appear to be a git repository\n> \n> Note the '//' at the start of the path -- on most *nix systems '//'\n> is\n> effectively identical to '/'.  On Cygwin, however, '//' is used to\n> access Windows UNC paths: what Windows calls \"\\\\server\\share\", Cygwin\n> calls \"//server/share\".  If you replace the '//' with '/' you get the\n> locatoin of the repository; but here Cygwin is looking for the\n> repository in a share called \"Adam\" on a network server called\n> \"home\"...\n> \n> I suspect the correct fix here is to fix whatever's causing Git to\n> generate a path with that '//'.  If nobody else gets to it soon\n> (probably on the order of a week before I'll get the chance), I'll go\n> code diving and submit a patch.\n> \n> > I tried building on Linux with the Cygwin build knobs found in\n> > config.mak.uname, but I couldn't get it to fail. I also wondered if\n> > the\n> > test was doing something with the shell that might not be portable,\n> > but\n> > I don't see anything interesting.\n> \n> If I recall correctly, the correct interpretation of '//' isn't\n> defined\n> in POSIX, so whatever's causing that path to be generated is the bit\n> that's not fully portable.  It looks as though t5813 throwing this up\n> is\n> just a coincidence rather than it being particularly related to the\n> function those tests are actually testing.\n\nLooks like lib-proto-disable.sh's fake SSH doesn't strip double leading\n/'es from the path. Try this patch:\n\ndiff --git a/t/t5813-proto-disable-ssh.sh b/t/t5813-proto-disable\n-ssh.sh\nindex ad877d7..a954ead 100755\n--- a/t/t5813-proto-disable-ssh.sh\n+++ b/t/t5813-proto-disable-ssh.sh\n@@ -14,7 +14,7 @@ test_expect_success 'setup repository to clone' '\n '\n \n test_proto \"host:path\" ssh \"remote:repo.git\"\n-test_proto \"ssh://\" ssh \"ssh://remote/$PWD/remote/repo.git\"\n-test_proto \"git+ssh://\" ssh \"git+ssh://remote/$PWD/remote/repo.git\"\n+test_proto \"ssh://\" ssh \"ssh://remote$PWD/remote/repo.git\"\n+test_proto \"git+ssh://\" ssh \"git+ssh://remote$PWD/remote/repo.git\"\n \n test_done\n\n\n-- \nDennis Kaarsemaker\nwww.kaarsemaker.net\n"},{"id":"273053","messageId":"563E6B47.5000807@ramsayjones.plus.com","threadId":"40748","inReplyTo":"1446930165.16957.9.camel@kaarsemaker.net","subject":"Re: Bug: t5813 failing on Cygwin","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2015-11-07T21:21:11Z","receivedAt":"2015-11-07T21:21:11Z","isPatch":false,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\n\nOn 07/11/15 21:02, Dennis Kaarsemaker wrote:\n> On za, 2015-11-07 at 19:20 +0000, Adam Dinwoodie wrote:\n>> On Sat, Nov 07, 2015 at 01:45:27PM -0500, Jeff King wrote:\n>>> On Sat, Nov 07, 2015 at 12:11:29PM +0000, Adam Dinwoodie wrote:\n>>>\n>>>> Specifically, I'm seeing t5813 subtests 9-13 and 15-19 failing.\n>>>> This happens\n>>>> with a clean build straight from the Git source tree (git clean \n>>>> -dfx && make\n>>>> configure && ./configure && make && cd t && ./t5813-proto-disable\n>>>> -ssh.sh) as\n>>>> well as builds using the Cygwin packaging paraphernalia.\n>>>\n>>> What does the output of \"./t5813-proto-disable-ssh.sh -v -i\" show?\n>>>\n>>> It seems strange that it would fail only on Cygwin; this code\n>>> doesn't\n>>> really use any platform-dependent features. It's also weird that it\n>>> fails _only_ for ssh, and _only_ on the tests that are using\n>>> \"ssh://\"\n>>> URLs are not \"host:path\" syntax.\n>>\n>> Ah!  I thought I'd checked that already, but looking at the output\n>> now I\n>> can see what's going wrong.  Cutting down to the relevant error:\n>>\n>>     ssh: remote git-upload-pack '//home/Adam/vcs/Cygwin-Git/git-2.6.2\n>> -1.x86_64/build/t/trash directory.t5813-proto-disable\n>> -ssh/remote/repo.git' fatal: '//home/Adam/vcs/Cygwin-Git/git-2.6.2\n>> -1.x86_64/build/t/trash directory.t5813-proto-disable\n>> -ssh/remote/repo.git' does not appear to be a git repository\n>>\n>> Note the '//' at the start of the path -- on most *nix systems '//'\n>> is\n>> effectively identical to '/'.  On Cygwin, however, '//' is used to\n>> access Windows UNC paths: what Windows calls \"\\\\server\\share\", Cygwin\n>> calls \"//server/share\".  If you replace the '//' with '/' you get the\n>> locatoin of the repository; but here Cygwin is looking for the\n>> repository in a share called \"Adam\" on a network server called\n>> \"home\"...\n>>\n>> I suspect the correct fix here is to fix whatever's causing Git to\n>> generate a path with that '//'.  If nobody else gets to it soon\n>> (probably on the order of a week before I'll get the chance), I'll go\n>> code diving and submit a patch.\n>>\n>>> I tried building on Linux with the Cygwin build knobs found in\n>>> config.mak.uname, but I couldn't get it to fail. I also wondered if\n>>> the\n>>> test was doing something with the shell that might not be portable,\n>>> but\n>>> I don't see anything interesting.\n>>\n>> If I recall correctly, the correct interpretation of '//' isn't\n>> defined\n>> in POSIX, so whatever's causing that path to be generated is the bit\n>> that's not fully portable.  It looks as though t5813 throwing this up\n>> is\n>> just a coincidence rather than it being particularly related to the\n>> function those tests are actually testing.\n> \n> Looks like lib-proto-disable.sh's fake SSH doesn't strip double leading\n> /'es from the path. Try this patch:\n> \n> diff --git a/t/t5813-proto-disable-ssh.sh b/t/t5813-proto-disable\n> -ssh.sh\n> index ad877d7..a954ead 100755\n> --- a/t/t5813-proto-disable-ssh.sh\n> +++ b/t/t5813-proto-disable-ssh.sh\n> @@ -14,7 +14,7 @@ test_expect_success 'setup repository to clone' '\n>  '\n>  \n>  test_proto \"host:path\" ssh \"remote:repo.git\"\n> -test_proto \"ssh://\" ssh \"ssh://remote/$PWD/remote/repo.git\"\n> -test_proto \"git+ssh://\" ssh \"git+ssh://remote/$PWD/remote/repo.git\"\n> +test_proto \"ssh://\" ssh \"ssh://remote$PWD/remote/repo.git\"\n> +test_proto \"git+ssh://\" ssh \"git+ssh://remote$PWD/remote/repo.git\"\n\nHeh, this looks familiar ... see, for example, commit 3a81f33c5. ;-)\n\nATB,\nRamsay Jones\n"},{"id":"273054","messageId":"563E83C2.5050300@ramsayjones.plus.com","threadId":"40748","inReplyTo":"563E6B47.5000807@ramsayjones.plus.com","subject":"Re: Bug: t5813 failing on Cygwin","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2015-11-07T23:05:38Z","receivedAt":"2015-11-07T23:05:38Z","isPatch":false,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\n\nOn 07/11/15 21:21, Ramsay Jones wrote:\n> \n> \n> On 07/11/15 21:02, Dennis Kaarsemaker wrote:\n>> On za, 2015-11-07 at 19:20 +0000, Adam Dinwoodie wrote:\n>>> On Sat, Nov 07, 2015 at 01:45:27PM -0500, Jeff King wrote:\n>>>> On Sat, Nov 07, 2015 at 12:11:29PM +0000, Adam Dinwoodie wrote:\n>>>>\n>>>>> Specifically, I'm seeing t5813 subtests 9-13 and 15-19 failing.\n>>>>> This happens\n>>>>> with a clean build straight from the Git source tree (git clean \n>>>>> -dfx && make\n>>>>> configure && ./configure && make && cd t && ./t5813-proto-disable\n>>>>> -ssh.sh) as\n>>>>> well as builds using the Cygwin packaging paraphernalia.\n>>>>\n>>>> What does the output of \"./t5813-proto-disable-ssh.sh -v -i\" show?\n>>>>\n>>>> It seems strange that it would fail only on Cygwin; this code\n>>>> doesn't\n>>>> really use any platform-dependent features. It's also weird that it\n>>>> fails _only_ for ssh, and _only_ on the tests that are using\n>>>> \"ssh://\"\n>>>> URLs are not \"host:path\" syntax.\n>>>\n>>> Ah!  I thought I'd checked that already, but looking at the output\n>>> now I\n>>> can see what's going wrong.  Cutting down to the relevant error:\n>>>\n>>>     ssh: remote git-upload-pack '//home/Adam/vcs/Cygwin-Git/git-2.6.2\n>>> -1.x86_64/build/t/trash directory.t5813-proto-disable\n>>> -ssh/remote/repo.git' fatal: '//home/Adam/vcs/Cygwin-Git/git-2.6.2\n>>> -1.x86_64/build/t/trash directory.t5813-proto-disable\n>>> -ssh/remote/repo.git' does not appear to be a git repository\n>>>\n>>> Note the '//' at the start of the path -- on most *nix systems '//'\n>>> is\n>>> effectively identical to '/'.  On Cygwin, however, '//' is used to\n>>> access Windows UNC paths: what Windows calls \"\\\\server\\share\", Cygwin\n>>> calls \"//server/share\".  If you replace the '//' with '/' you get the\n>>> locatoin of the repository; but here Cygwin is looking for the\n>>> repository in a share called \"Adam\" on a network server called\n>>> \"home\"...\n>>>\n>>> I suspect the correct fix here is to fix whatever's causing Git to\n>>> generate a path with that '//'.  If nobody else gets to it soon\n>>> (probably on the order of a week before I'll get the chance), I'll go\n>>> code diving and submit a patch.\n>>>\n>>>> I tried building on Linux with the Cygwin build knobs found in\n>>>> config.mak.uname, but I couldn't get it to fail. I also wondered if\n>>>> the\n>>>> test was doing something with the shell that might not be portable,\n>>>> but\n>>>> I don't see anything interesting.\n>>>\n>>> If I recall correctly, the correct interpretation of '//' isn't\n>>> defined\n>>> in POSIX, so whatever's causing that path to be generated is the bit\n>>> that's not fully portable.  It looks as though t5813 throwing this up\n>>> is\n>>> just a coincidence rather than it being particularly related to the\n>>> function those tests are actually testing.\n>>\n>> Looks like lib-proto-disable.sh's fake SSH doesn't strip double leading\n>> /'es from the path. Try this patch:\n>>\n>> diff --git a/t/t5813-proto-disable-ssh.sh b/t/t5813-proto-disable\n>> -ssh.sh\n>> index ad877d7..a954ead 100755\n>> --- a/t/t5813-proto-disable-ssh.sh\n>> +++ b/t/t5813-proto-disable-ssh.sh\n>> @@ -14,7 +14,7 @@ test_expect_success 'setup repository to clone' '\n>>  '\n>>  \n>>  test_proto \"host:path\" ssh \"remote:repo.git\"\n>> -test_proto \"ssh://\" ssh \"ssh://remote/$PWD/remote/repo.git\"\n>> -test_proto \"git+ssh://\" ssh \"git+ssh://remote/$PWD/remote/repo.git\"\n>> +test_proto \"ssh://\" ssh \"ssh://remote$PWD/remote/repo.git\"\n>> +test_proto \"git+ssh://\" ssh \"git+ssh://remote$PWD/remote/repo.git\"\n> \n> Heh, this looks familiar ... see, for example, commit 3a81f33c5. ;-)\n\nAn alternative patch may look like this:\n\ndiff --git a/connect.c b/connect.c\nindex 108f5ab..fc73cf9 100644\n--- a/connect.c\n+++ b/connect.c\n@@ -636,6 +636,8 @@ static enum protocol parse_connect_url(const char *url_orig, char **ret_host,\n \tend = path; /* Need to \\0 terminate host here */\n \tif (separator == ':')\n \t\tpath++; /* path starts after ':' */\n+\tif (starts_with(path, \"//\"))\n+\t\tpath++;\n \tif (protocol == PROTO_GIT || protocol == PROTO_SSH) {\n \t\tif (path[1] == '~')\n \t\t\tpath++;\n\nIt seems to work, but I haven't thought about it too deeply ...\nso I don't know if there are any problems lurking. :)\n\nI have to go now, so if somebody wants to take this up ...\n\nATB,\nRamsay Jones\n"},{"id":"273055","messageId":"20151107232449.GX14466@dinwoodie.org","threadId":"40748","inReplyTo":"1446930165.16957.9.camel@kaarsemaker.net","subject":"Re: Bug: t5813 failing on Cygwin","fromName":"Adam Dinwoodie","fromEmail":"adam@dinwoodie.org","sentAt":"2015-11-07T23:24:49Z","receivedAt":"2015-11-07T23:24:49Z","isPatch":false,"sender":{"key":"adam@dinwoodie.org","avatar":"https://avatars.githubusercontent.com/u/1397507?v=4"},"body":"On Sat, Nov 07, 2015 at 10:02:45PM +0100, Dennis Kaarsemaker wrote:\n> On za, 2015-11-07 at 19:20 +0000, Adam Dinwoodie wrote:\n> > On Sat, Nov 07, 2015 at 01:45:27PM -0500, Jeff King wrote:\n> > > On Sat, Nov 07, 2015 at 12:11:29PM +0000, Adam Dinwoodie wrote:\n> > > \n> > > > Specifically, I'm seeing t5813 subtests 9-13 and 15-19 failing.\n> > > > This happens\n> > > > with a clean build straight from the Git source tree (git clean \n> > > > -dfx && make\n> > > > configure && ./configure && make && cd t && ./t5813-proto-disable\n> > > > -ssh.sh) as\n> > > > well as builds using the Cygwin packaging paraphernalia.\n> > > \n> > > What does the output of \"./t5813-proto-disable-ssh.sh -v -i\" show?\n> > > \n> > > It seems strange that it would fail only on Cygwin; this code\n> > > doesn't\n> > > really use any platform-dependent features. It's also weird that it\n> > > fails _only_ for ssh, and _only_ on the tests that are using\n> > > \"ssh://\"\n> > > URLs are not \"host:path\" syntax.\n> > \n> > Ah!  I thought I'd checked that already, but looking at the output\n> > now I\n> > can see what's going wrong.  Cutting down to the relevant error:\n> > \n> >     ssh: remote git-upload-pack '//home/Adam/vcs/Cygwin-Git/git-2.6.2\n> > -1.x86_64/build/t/trash directory.t5813-proto-disable\n> > -ssh/remote/repo.git' fatal: '//home/Adam/vcs/Cygwin-Git/git-2.6.2\n> > -1.x86_64/build/t/trash directory.t5813-proto-disable\n> > -ssh/remote/repo.git' does not appear to be a git repository\n> > \n> > Note the '//' at the start of the path -- on most *nix systems '//'\n> > is\n> > effectively identical to '/'.  On Cygwin, however, '//' is used to\n> > access Windows UNC paths: what Windows calls \"\\\\server\\share\", Cygwin\n> > calls \"//server/share\".  If you replace the '//' with '/' you get the\n> > locatoin of the repository; but here Cygwin is looking for the\n> > repository in a share called \"Adam\" on a network server called\n> > \"home\"...\n> > \n> > I suspect the correct fix here is to fix whatever's causing Git to\n> > generate a path with that '//'.  If nobody else gets to it soon\n> > (probably on the order of a week before I'll get the chance), I'll go\n> > code diving and submit a patch.\n> > \n> > > I tried building on Linux with the Cygwin build knobs found in\n> > > config.mak.uname, but I couldn't get it to fail. I also wondered if\n> > > the\n> > > test was doing something with the shell that might not be portable,\n> > > but\n> > > I don't see anything interesting.\n> > \n> > If I recall correctly, the correct interpretation of '//' isn't\n> > defined\n> > in POSIX, so whatever's causing that path to be generated is the bit\n> > that's not fully portable.  It looks as though t5813 throwing this up\n> > is\n> > just a coincidence rather than it being particularly related to the\n> > function those tests are actually testing.\n> \n> Looks like lib-proto-disable.sh's fake SSH doesn't strip double leading\n> /'es from the path. Try this patch:\n> \n> diff --git a/t/t5813-proto-disable-ssh.sh b/t/t5813-proto-disable\n> -ssh.sh\n> index ad877d7..a954ead 100755\n> --- a/t/t5813-proto-disable-ssh.sh\n> +++ b/t/t5813-proto-disable-ssh.sh\n> @@ -14,7 +14,7 @@ test_expect_success 'setup repository to clone' '\n>  '\n>  \n>  test_proto \"host:path\" ssh \"remote:repo.git\"\n> -test_proto \"ssh://\" ssh \"ssh://remote/$PWD/remote/repo.git\"\n> -test_proto \"git+ssh://\" ssh \"git+ssh://remote/$PWD/remote/repo.git\"\n> +test_proto \"ssh://\" ssh \"ssh://remote$PWD/remote/repo.git\"\n> +test_proto \"git+ssh://\" ssh \"git+ssh://remote$PWD/remote/repo.git\"\n>  \n>  test_done\n>  \n\nConfirmed this patch has the test running successfully for me.\n\nAdam\n"},{"id":"273056","messageId":"1446939168.16957.11.camel@kaarsemaker.net","threadId":"40748","inReplyTo":"563E83C2.5050300@ramsayjones.plus.com","subject":"Re: Bug: t5813 failing on Cygwin","fromName":"Dennis Kaarsemaker","fromEmail":"dennis@kaarsemaker.net","sentAt":"2015-11-07T23:32:48Z","receivedAt":"2015-11-07T23:32:48Z","isPatch":false,"sender":{"key":"dennis@kaarsemaker.net","avatar":"https://avatars.githubusercontent.com/u/200649?v=4"},"body":"On za, 2015-11-07 at 23:05 +0000, Ramsay Jones wrote:\n> \n> On 07/11/15 21:21, Ramsay Jones wrote:\n> > \n> > \n> > On 07/11/15 21:02, Dennis Kaarsemaker wrote:\n> > > On za, 2015-11-07 at 19:20 +0000, Adam Dinwoodie wrote:\n> > > > On Sat, Nov 07, 2015 at 01:45:27PM -0500, Jeff King wrote:\n> > > > > On Sat, Nov 07, 2015 at 12:11:29PM +0000, Adam Dinwoodie\n> > > > > wrote:\n> > > > > \n> > > > > > Specifically, I'm seeing t5813 subtests 9-13 and 15-19\n> > > > > > failing.\n> > > > > > This happens\n> > > > > > with a clean build straight from the Git source tree (git\n> > > > > > clean \n> > > > > > -dfx && make\n> > > > > > configure && ./configure && make && cd t && ./t5813-proto\n> > > > > > -disable\n> > > > > > -ssh.sh) as\n> > > > > > well as builds using the Cygwin packaging paraphernalia.\n> > > > > \n> > > > > What does the output of \"./t5813-proto-disable-ssh.sh -v -i\"\n> > > > > show?\n> > > > > \n> > > > > It seems strange that it would fail only on Cygwin; this code\n> > > > > doesn't\n> > > > > really use any platform-dependent features. It's also weird\n> > > > > that it\n> > > > > fails _only_ for ssh, and _only_ on the tests that are using\n> > > > > \"ssh://\"\n> > > > > URLs are not \"host:path\" syntax.\n> > > > \n> > > > Ah!  I thought I'd checked that already, but looking at the\n> > > > output\n> > > > now I\n> > > > can see what's going wrong.  Cutting down to the relevant\n> > > > error:\n> > > > \n> > > >     ssh: remote git-upload-pack '//home/Adam/vcs/Cygwin-Git/git\n> > > > -2.6.2\n> > > > -1.x86_64/build/t/trash directory.t5813-proto-disable\n> > > > -ssh/remote/repo.git' fatal: '//home/Adam/vcs/Cygwin-Git/git\n> > > > -2.6.2\n> > > > -1.x86_64/build/t/trash directory.t5813-proto-disable\n> > > > -ssh/remote/repo.git' does not appear to be a git repository\n> > > > \n> > > > Note the '//' at the start of the path -- on most *nix systems\n> > > > '//'\n> > > > is\n> > > > effectively identical to '/'.  On Cygwin, however, '//' is used\n> > > > to\n> > > > access Windows UNC paths: what Windows calls \"\\\\server\\share\",\n> > > > Cygwin\n> > > > calls \"//server/share\".  If you replace the '//' with '/' you\n> > > > get the\n> > > > locatoin of the repository; but here Cygwin is looking for the\n> > > > repository in a share called \"Adam\" on a network server called\n> > > > \"home\"...\n> > > > \n> > > > I suspect the correct fix here is to fix whatever's causing Git\n> > > > to\n> > > > generate a path with that '//'.  If nobody else gets to it soon\n> > > > (probably on the order of a week before I'll get the chance),\n> > > > I'll go\n> > > > code diving and submit a patch.\n> > > > \n> > > > > I tried building on Linux with the Cygwin build knobs found\n> > > > > in\n> > > > > config.mak.uname, but I couldn't get it to fail. I also\n> > > > > wondered if\n> > > > > the\n> > > > > test was doing something with the shell that might not be\n> > > > > portable,\n> > > > > but\n> > > > > I don't see anything interesting.\n> > > > \n> > > > If I recall correctly, the correct interpretation of '//' isn't\n> > > > defined\n> > > > in POSIX, so whatever's causing that path to be generated is\n> > > > the bit\n> > > > that's not fully portable.  It looks as though t5813 throwing\n> > > > this up\n> > > > is\n> > > > just a coincidence rather than it being particularly related to\n> > > > the\n> > > > function those tests are actually testing.\n> > > \n> > > Looks like lib-proto-disable.sh's fake SSH doesn't strip double\n> > > leading\n> > > /'es from the path. Try this patch:\n> > > \n> > > diff --git a/t/t5813-proto-disable-ssh.sh b/t/t5813-proto-disable\n> > > -ssh.sh\n> > > index ad877d7..a954ead 100755\n> > > --- a/t/t5813-proto-disable-ssh.sh\n> > > +++ b/t/t5813-proto-disable-ssh.sh\n> > > @@ -14,7 +14,7 @@ test_expect_success 'setup repository to clone'\n> > > '\n> > >  '\n> > >  \n> > >  test_proto \"host:path\" ssh \"remote:repo.git\"\n> > > -test_proto \"ssh://\" ssh \"ssh://remote/$PWD/remote/repo.git\"\n> > > -test_proto \"git+ssh://\" ssh\n> > > \"git+ssh://remote/$PWD/remote/repo.git\"\n> > > +test_proto \"ssh://\" ssh \"ssh://remote$PWD/remote/repo.git\"\n> > > +test_proto \"git+ssh://\" ssh\n> > > \"git+ssh://remote$PWD/remote/repo.git\"\n> > \n> > Heh, this looks familiar ... see, for example, commit 3a81f33c5. ;\n> > -)\n> \n> An alternative patch may look like this:\n> \n> diff --git a/connect.c b/connect.c\n> index 108f5ab..fc73cf9 100644\n> --- a/connect.c\n> +++ b/connect.c\n> @@ -636,6 +636,8 @@ static enum protocol parse_connect_url(const char\n> *url_orig, char **ret_host,\n>  \tend = path; /* Need to \\0 terminate host here */\n>  \tif (separator == ':')\n>  \t\tpath++; /* path starts after ':' */\n> +\tif (starts_with(path, \"//\"))\n> +\t\tpath++;\n>  \tif (protocol == PROTO_GIT || protocol == PROTO_SSH) {\n>  \t\tif (path[1] == '~')\n>  \t\t\tpath++;\n> \n> It seems to work, but I haven't thought about it too deeply ...\n> so I don't know if there are any problems lurking. :)\n> \n> I have to go now, so if somebody wants to take this up ...\n\nWon't that break file:////server/share urls on cygwin?\n\n-- \nDennis Kaarsemaker\nwww.kaarsemaker.net\n"},{"id":"273057","messageId":"563EA972.9000209@ramsayjones.plus.com","threadId":"40748","inReplyTo":"1446939168.16957.11.camel@kaarsemaker.net","subject":"Re: Bug: t5813 failing on Cygwin","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2015-11-08T01:46:26Z","receivedAt":"2015-11-08T01:46:26Z","isPatch":false,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\n\nOn 07/11/15 23:32, Dennis Kaarsemaker wrote:\n> On za, 2015-11-07 at 23:05 +0000, Ramsay Jones wrote:\n>>\n>> On 07/11/15 21:21, Ramsay Jones wrote:\n>>>\n>>>\n>>> On 07/11/15 21:02, Dennis Kaarsemaker wrote:\n>>>> On za, 2015-11-07 at 19:20 +0000, Adam Dinwoodie wrote:\n>>>>> On Sat, Nov 07, 2015 at 01:45:27PM -0500, Jeff King wrote:\n>>>>>> On Sat, Nov 07, 2015 at 12:11:29PM +0000, Adam Dinwoodie\n>>>>>> wrote:\n>>>>>>\n>>>>>>> Specifically, I'm seeing t5813 subtests 9-13 and 15-19\n>>>>>>> failing.\n>>>>>>> This happens\n>>>>>>> with a clean build straight from the Git source tree (git\n>>>>>>> clean \n>>>>>>> -dfx && make\n>>>>>>> configure && ./configure && make && cd t && ./t5813-proto\n>>>>>>> -disable\n>>>>>>> -ssh.sh) as\n>>>>>>> well as builds using the Cygwin packaging paraphernalia.\n>>>>>>\n>>>>>> What does the output of \"./t5813-proto-disable-ssh.sh -v -i\"\n>>>>>> show?\n>>>>>>\n>>>>>> It seems strange that it would fail only on Cygwin; this code\n>>>>>> doesn't\n>>>>>> really use any platform-dependent features. It's also weird\n>>>>>> that it\n>>>>>> fails _only_ for ssh, and _only_ on the tests that are using\n>>>>>> \"ssh://\"\n>>>>>> URLs are not \"host:path\" syntax.\n>>>>>\n>>>>> Ah!  I thought I'd checked that already, but looking at the\n>>>>> output\n>>>>> now I\n>>>>> can see what's going wrong.  Cutting down to the relevant\n>>>>> error:\n>>>>>\n>>>>>     ssh: remote git-upload-pack '//home/Adam/vcs/Cygwin-Git/git\n>>>>> -2.6.2\n>>>>> -1.x86_64/build/t/trash directory.t5813-proto-disable\n>>>>> -ssh/remote/repo.git' fatal: '//home/Adam/vcs/Cygwin-Git/git\n>>>>> -2.6.2\n>>>>> -1.x86_64/build/t/trash directory.t5813-proto-disable\n>>>>> -ssh/remote/repo.git' does not appear to be a git repository\n>>>>>\n>>>>> Note the '//' at the start of the path -- on most *nix systems\n>>>>> '//'\n>>>>> is\n>>>>> effectively identical to '/'.  On Cygwin, however, '//' is used\n>>>>> to\n>>>>> access Windows UNC paths: what Windows calls \"\\\\server\\share\",\n>>>>> Cygwin\n>>>>> calls \"//server/share\".  If you replace the '//' with '/' you\n>>>>> get the\n>>>>> locatoin of the repository; but here Cygwin is looking for the\n>>>>> repository in a share called \"Adam\" on a network server called\n>>>>> \"home\"...\n>>>>>\n>>>>> I suspect the correct fix here is to fix whatever's causing Git\n>>>>> to\n>>>>> generate a path with that '//'.  If nobody else gets to it soon\n>>>>> (probably on the order of a week before I'll get the chance),\n>>>>> I'll go\n>>>>> code diving and submit a patch.\n>>>>>\n>>>>>> I tried building on Linux with the Cygwin build knobs found\n>>>>>> in\n>>>>>> config.mak.uname, but I couldn't get it to fail. I also\n>>>>>> wondered if\n>>>>>> the\n>>>>>> test was doing something with the shell that might not be\n>>>>>> portable,\n>>>>>> but\n>>>>>> I don't see anything interesting.\n>>>>>\n>>>>> If I recall correctly, the correct interpretation of '//' isn't\n>>>>> defined\n>>>>> in POSIX, so whatever's causing that path to be generated is\n>>>>> the bit\n>>>>> that's not fully portable.  It looks as though t5813 throwing\n>>>>> this up\n>>>>> is\n>>>>> just a coincidence rather than it being particularly related to\n>>>>> the\n>>>>> function those tests are actually testing.\n>>>>\n>>>> Looks like lib-proto-disable.sh's fake SSH doesn't strip double\n>>>> leading\n>>>> /'es from the path. Try this patch:\n>>>>\n>>>> diff --git a/t/t5813-proto-disable-ssh.sh b/t/t5813-proto-disable\n>>>> -ssh.sh\n>>>> index ad877d7..a954ead 100755\n>>>> --- a/t/t5813-proto-disable-ssh.sh\n>>>> +++ b/t/t5813-proto-disable-ssh.sh\n>>>> @@ -14,7 +14,7 @@ test_expect_success 'setup repository to clone'\n>>>> '\n>>>>  '\n>>>>  \n>>>>  test_proto \"host:path\" ssh \"remote:repo.git\"\n>>>> -test_proto \"ssh://\" ssh \"ssh://remote/$PWD/remote/repo.git\"\n>>>> -test_proto \"git+ssh://\" ssh\n>>>> \"git+ssh://remote/$PWD/remote/repo.git\"\n>>>> +test_proto \"ssh://\" ssh \"ssh://remote$PWD/remote/repo.git\"\n>>>> +test_proto \"git+ssh://\" ssh\n>>>> \"git+ssh://remote$PWD/remote/repo.git\"\n>>>\n>>> Heh, this looks familiar ... see, for example, commit 3a81f33c5. ;\n>>> -)\n>>\n>> An alternative patch may look like this:\n>>\n>> diff --git a/connect.c b/connect.c\n>> index 108f5ab..fc73cf9 100644\n>> --- a/connect.c\n>> +++ b/connect.c\n>> @@ -636,6 +636,8 @@ static enum protocol parse_connect_url(const char\n>> *url_orig, char **ret_host,\n>>  \tend = path; /* Need to \\0 terminate host here */\n>>  \tif (separator == ':')\n>>  \t\tpath++; /* path starts after ':' */\n>> +\tif (starts_with(path, \"//\"))\n>> +\t\tpath++;\n>>  \tif (protocol == PROTO_GIT || protocol == PROTO_SSH) {\n>>  \t\tif (path[1] == '~')\n>>  \t\t\tpath++;\n>>\n>> It seems to work, but I haven't thought about it too deeply ...\n>> so I don't know if there are any problems lurking. :)\n>>\n>> I have to go now, so if somebody wants to take this up ...\n> \n> Won't that break file:////server/share urls on cygwin?\n\nHmm, yes ... do they work? (I'm not in a position to test them)\nie. does 'git clone [file://]//myserver/myshare/myrepo.git' work now\non cygwin? How about git for windows?\n\nI suppose we could restrict the stripping to git and ssh protocols\nlike so:\n\ndiff --git a/connect.c b/connect.c\nindex 108f5ab..62e89aa 100644\n--- a/connect.c\n+++ b/connect.c\n@@ -637,6 +637,8 @@ static enum protocol parse_connect_url(const char *url_orig, char **ret_host,\n \tif (separator == ':')\n \t\tpath++; /* path starts after ':' */\n \tif (protocol == PROTO_GIT || protocol == PROTO_SSH) {\n+\t\twhile (starts_with(path, \"//\"))\n+\t\t\tpath++;\n \t\tif (path[1] == '~')\n \t\t\tpath++;\n \t}\n\n... where I've added a loop to skip multiple /'s (may not be\nnecessary).\n\nAgain, it seems to work ... :-D\n\nATB,\nRamsay Jones\n"},{"id":"273060","messageId":"20151108051059.GB19191@sigill.intra.peff.net","threadId":"40748","inReplyTo":"1446930165.16957.9.camel@kaarsemaker.net","subject":"Re: Bug: t5813 failing on Cygwin","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-11-08T05:10:59Z","receivedAt":"2015-11-08T05:10:59Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Nov 07, 2015 at 10:02:45PM +0100, Dennis Kaarsemaker wrote:\n\n> Looks like lib-proto-disable.sh's fake SSH doesn't strip double leading\n> /'es from the path. Try this patch:\n> \n> diff --git a/t/t5813-proto-disable-ssh.sh b/t/t5813-proto-disable\n> -ssh.sh\n> index ad877d7..a954ead 100755\n> --- a/t/t5813-proto-disable-ssh.sh\n> +++ b/t/t5813-proto-disable-ssh.sh\n> @@ -14,7 +14,7 @@ test_expect_success 'setup repository to clone' '\n>  '\n>  \n>  test_proto \"host:path\" ssh \"remote:repo.git\"\n> -test_proto \"ssh://\" ssh \"ssh://remote/$PWD/remote/repo.git\"\n> -test_proto \"git+ssh://\" ssh \"git+ssh://remote/$PWD/remote/repo.git\"\n> +test_proto \"ssh://\" ssh \"ssh://remote$PWD/remote/repo.git\"\n> +test_proto \"git+ssh://\" ssh \"git+ssh://remote$PWD/remote/repo.git\"\n>  \n>  test_done\n\nGood catch. It's a shame that the resulting URL becomes a little less\nreadable, but given that the damage is limited to this one test, I think\nwe can live with it. Working around it in the fake ssh script would\nprobably end up unnecessarily complex.\n\nWe may want to have git itself remove extra slashes from URLs, as Ramsay\nsuggested elsewhere, but I would worry about regressions. Let's solve\nthis test portability problem by itself, and we can consider the other\nas a separate topic if anybody wants to pursue it.\n\nDennis, can you roll up a full patch with a commit message?\n\n-Peff\n"},{"id":"273063","messageId":"563EF5B9.9020002@web.de","threadId":"40748","inReplyTo":"1446939168.16957.11.camel@kaarsemaker.net","subject":"Re: Bug: t5813 failing on Cygwin","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2015-11-08T07:11:53Z","receivedAt":"2015-11-08T07:11:53Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":">>\n>> diff --git a/connect.c b/connect.c\n>> index 108f5ab..fc73cf9 100644\n>> --- a/connect.c\n>> +++ b/connect.c\n>> @@ -636,6 +636,8 @@ static enum protocol parse_connect_url(const char\n>> *url_orig, char **ret_host,\n>>  \tend = path; /* Need to \\0 terminate host here */\n>>  \tif (separator == ':')\n>>  \t\tpath++; /* path starts after ':' */\n>> +\tif (starts_with(path, \"//\"))\n>> +\t\tpath++;\n>>  \tif (protocol == PROTO_GIT || protocol == PROTO_SSH) {\n>>  \t\tif (path[1] == '~')\n>>  \t\t\tpath++;\n>>\n>> It seems to work, but I haven't thought about it too deeply ...\n>> so I don't know if there are any problems lurking. :)\n>>\n>> I have to go now, so if somebody wants to take this up ...\n> \n> Won't that break file:////server/share urls on cygwin?\n> \nThe official way to specify UNC names looks like this:\nfile://<host>/<path>\n(Or file://server/share/morepath to follow your example)\n#http://www.faqs.org/rfcs/rfc1738.html\n\nBut unfortunately Git doesn't support it.\nI can put it on the to-do list...\n\nBut using \"file:////\" this is not an official syntax,\nand should (in theory) not be used by any user.\nDoes anybody use it?\n\nOr do people use simply \"git clone //server/share/\" ?\n \n"},{"id":"273064","messageId":"20151108095400.GA9448@spirit","threadId":"40748","inReplyTo":"20151108051059.GB19191@sigill.intra.peff.net","subject":"[PATCH] t5813: avoid creating urls that break on cygwin","fromName":"Dennis Kaarsemaker","fromEmail":"dennis@kaarsemaker.net","sentAt":"2015-11-08T09:54:04Z","receivedAt":"2015-11-08T09:54:04Z","isPatch":true,"sender":{"key":"dennis@kaarsemaker.net","avatar":"https://avatars.githubusercontent.com/u/200649?v=4"},"body":"The fake ssh used by this test simply strips ssh://host from the url,\nleaving paths behind that start with //, which cygwin interprets as UNC\npaths, causing the test to fail.\n\nWe may want to actually fix this in git itself, making it remove extra\nslashes from urls before feeding them to transports or helpers, but\nthat's for another topic as it could cause regressions.\n\nSigned-off-by: Dennis Kaarsemaker <dennis@kaarsemaker.net>\n---\n t/t5813-proto-disable-ssh.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t5813-proto-disable-ssh.sh b/t/t5813-proto-disable-ssh.sh\nindex ad877d7..a954ead 100755\n--- a/t/t5813-proto-disable-ssh.sh\n+++ b/t/t5813-proto-disable-ssh.sh\n@@ -14,7 +14,7 @@ test_expect_success 'setup repository to clone' '\n '\n \n test_proto \"host:path\" ssh \"remote:repo.git\"\n-test_proto \"ssh://\" ssh \"ssh://remote/$PWD/remote/repo.git\"\n-test_proto \"git+ssh://\" ssh \"git+ssh://remote/$PWD/remote/repo.git\"\n+test_proto \"ssh://\" ssh \"ssh://remote$PWD/remote/repo.git\"\n+test_proto \"git+ssh://\" ssh \"git+ssh://remote$PWD/remote/repo.git\"\n \n test_done\n-- \n2.6.3-495-gf0a7f49\n\n\n-- \nDennis Kaarsemaker <dennis@kaarsemaker.net>\nhttp://twitter.com/seveas\n"},{"id":"273066","messageId":"563F4C61.5040500@ramsayjones.plus.com","threadId":"40748","inReplyTo":"20151108051059.GB19191@sigill.intra.peff.net","subject":"Re: Bug: t5813 failing on Cygwin","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2015-11-08T13:21:37Z","receivedAt":"2015-11-08T13:21:37Z","isPatch":false,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\n\nOn 08/11/15 05:10, Jeff King wrote:\n> On Sat, Nov 07, 2015 at 10:02:45PM +0100, Dennis Kaarsemaker wrote:\n> \n>> Looks like lib-proto-disable.sh's fake SSH doesn't strip double leading\n>> /'es from the path. Try this patch:\n>>\n>> diff --git a/t/t5813-proto-disable-ssh.sh b/t/t5813-proto-disable\n>> -ssh.sh\n>> index ad877d7..a954ead 100755\n>> --- a/t/t5813-proto-disable-ssh.sh\n>> +++ b/t/t5813-proto-disable-ssh.sh\n>> @@ -14,7 +14,7 @@ test_expect_success 'setup repository to clone' '\n>>  '\n>>  \n>>  test_proto \"host:path\" ssh \"remote:repo.git\"\n>> -test_proto \"ssh://\" ssh \"ssh://remote/$PWD/remote/repo.git\"\n>> -test_proto \"git+ssh://\" ssh \"git+ssh://remote/$PWD/remote/repo.git\"\n>> +test_proto \"ssh://\" ssh \"ssh://remote$PWD/remote/repo.git\"\n>> +test_proto \"git+ssh://\" ssh \"git+ssh://remote$PWD/remote/repo.git\"\n>>  \n>>  test_done\n> \n> Good catch. It's a shame that the resulting URL becomes a little less\n> readable, but given that the damage is limited to this one test, I think\n> we can live with it. Working around it in the fake ssh script would\n> probably end up unnecessarily complex.\n> \n> We may want to have git itself remove extra slashes from URLs, as Ramsay\n> suggested elsewhere, but I would worry about regressions. Let's solve\n> this test portability problem by itself, and we can consider the other\n> as a separate topic if anybody wants to pursue it.\n\nYep, this is essentially what I decided to do in a similar situation\nback in 2011 (see commit 3a81f33c5).\n\nUntil I looked into that bug, I hadn't given any thought to whether\ncygwin (let alone git) supported the UNC notation. At that time, I did\nspend a little time trying to determine if it worked, but for some\nreason I just couldn't get a network share configured properly.\nIt kept on giving me 'permission denied' errors - even using windows\nonly commands. :(\n\nSince I have no need for network shares on cygwin, I didn't try too\nhard ... I will leave it to people more motivated than me! ;-)\n\nATB,\nRamsay Jones\n"},{"id":"273080","messageId":"20151109154501.GA27224@sigill.intra.peff.net","threadId":"40748","inReplyTo":"20151108095400.GA9448@spirit","subject":"Re: [PATCH] t5813: avoid creating urls that break on cygwin","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-11-09T15:45:01Z","receivedAt":"2015-11-09T15:45:01Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Nov 08, 2015 at 10:54:04AM +0100, Dennis Kaarsemaker wrote:\n\n> The fake ssh used by this test simply strips ssh://host from the url,\n> leaving paths behind that start with //, which cygwin interprets as UNC\n> paths, causing the test to fail.\n\nI found the first sentence a little misleading. It is git itself that\nstrips the URL, isn't it? The problem is that we are feeding a URL with\na bogus path, which the fake ssh then tries to access (but in a way that\nhappens to work on Unix systems).\n\n-Peff\n"},{"id":"273098","messageId":"20151109174932.GA14146@spirit","threadId":"40748","inReplyTo":"20151109154501.GA27224@sigill.intra.peff.net","subject":"[PATCH] t5813: avoid creating urls that break on cygwin","fromName":"Dennis Kaarsemaker","fromEmail":"dennis@kaarsemaker.net","sentAt":"2015-11-09T17:49:35Z","receivedAt":"2015-11-09T17:49:35Z","isPatch":true,"sender":{"key":"dennis@kaarsemaker.net","avatar":"https://avatars.githubusercontent.com/u/200649?v=4"},"body":"When passed an ssh:// url, git strips ssh://host from the url but does\nnot remove leading slashes from the path. So when this test used\nssh://remote//path/to/pwd, the path accessed by our fake SSH is\n//path/to/pwd, which cygwin interprets as a UNC path, causing the test\nto fail.\n\nWe may want to actually fix this in git itself, making it remove extra\nslashes from urls before feeding them to transports or helpers, but\nthat's for another topic as it could cause regressions.\n\nSigned-off-by: Dennis Kaarsemaker <dennis@kaarsemaker.net>\n---\n\nYou're right of course. Somehow I remembered that the fake ssh was doing the\nstripping, but didn't check that when writing the commit message. How about\nthis version?\n\n t/t5813-proto-disable-ssh.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t5813-proto-disable-ssh.sh b/t/t5813-proto-disable-ssh.sh\nindex ad877d7..a954ead 100755\n--- a/t/t5813-proto-disable-ssh.sh\n+++ b/t/t5813-proto-disable-ssh.sh\n@@ -14,7 +14,7 @@ test_expect_success 'setup repository to clone' '\n '\n \n test_proto \"host:path\" ssh \"remote:repo.git\"\n-test_proto \"ssh://\" ssh \"ssh://remote/$PWD/remote/repo.git\"\n-test_proto \"git+ssh://\" ssh \"git+ssh://remote/$PWD/remote/repo.git\"\n+test_proto \"ssh://\" ssh \"ssh://remote$PWD/remote/repo.git\"\n+test_proto \"git+ssh://\" ssh \"git+ssh://remote$PWD/remote/repo.git\"\n \n test_done\n-- \n2.6.3-495-gf0a7f49\n\n\n-- \nDennis Kaarsemaker <dennis@kaarsemaker.net>\nhttp://twitter.com/seveas\n"},{"id":"273099","messageId":"20151109175025.GC29468@sigill.intra.peff.net","threadId":"40748","inReplyTo":"20151109174932.GA14146@spirit","subject":"Re: [PATCH] t5813: avoid creating urls that break on cygwin","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-11-09T17:50:26Z","receivedAt":"2015-11-09T17:50:26Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Nov 09, 2015 at 06:49:35PM +0100, Dennis Kaarsemaker wrote:\n\n> When passed an ssh:// url, git strips ssh://host from the url but does\n> not remove leading slashes from the path. So when this test used\n> ssh://remote//path/to/pwd, the path accessed by our fake SSH is\n> //path/to/pwd, which cygwin interprets as a UNC path, causing the test\n> to fail.\n> \n> We may want to actually fix this in git itself, making it remove extra\n> slashes from urls before feeding them to transports or helpers, but\n> that's for another topic as it could cause regressions.\n> \n> Signed-off-by: Dennis Kaarsemaker <dennis@kaarsemaker.net>\n> ---\n> \n> You're right of course. Somehow I remembered that the fake ssh was doing the\n> stripping, but didn't check that when writing the commit message. How about\n> this version?\n\nLooks good. Thanks.\n\n-Peff\n"}]}