{"thread":{"id":"22356","subject":"[PATCH] If deriving SVN_SSH from GIT_SSH on msys, also add quotes","startedAt":"2010-01-23T10:22:13Z","lastAt":"2010-01-23T20:11:17Z","messageCount":5,"participants":["Sebastian Schuberth","Sverre Rabbelier","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"132474","messageId":"4B5ACDD5.8080007@gmail.com","threadId":"22356","inReplyTo":null,"subject":"[PATCH] If deriving SVN_SSH from GIT_SSH on msys, also add quotes","fromName":"Sebastian Schuberth","fromEmail":"sschuberth@gmail.com","sentAt":"2010-01-23T10:22:13Z","receivedAt":"2010-01-23T10:22:13Z","isPatch":true,"sender":{"key":"sschuberth@gmail.com","avatar":"https://avatars.githubusercontent.com/u/349154?v=4"},"body":"In contrast to GIT_SSH, SVN_SSH requires quotes for paths that contain\nspaces. As GIT_SSH will not work if it contains quotes, it is save to\nassume it never contains quotes. Also, adding quotes to SVN_SSH for paths\nthat do not contain spaces does no harm. So we always add quotes when\nderiving SVN_SSH from GIT_SSH on msys.\n\nThis fixes msysGit issue 385, see\nhttp://code.google.com/p/msysgit/issues/detail?id=385\n\nSigned-off-by: Sebastian Schuberth <sschuberth@gmail.com>\n---\n git-svn.perl |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex 650c9e5..ef39a9f 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -26,6 +26,7 @@ if (! exists $ENV{SVN_SSH}) {\n \t\t$ENV{SVN_SSH} = $ENV{GIT_SSH};\n \t\tif ($^O eq 'msys') {\n \t\t\t$ENV{SVN_SSH} =~ s/\\\\/\\\\\\\\/g;\n+\t\t\t$ENV{SVN_SSH} =~ s/(.*)/\"$1\"/;\n \t\t}\n \t}\n }\n-- \n1.6.6.265.ga0f40\n"},{"id":"132478","messageId":"fabb9a1e1001230322t708756fahce326511d3f0bda5@mail.gmail.com","threadId":"22356","inReplyTo":"4B5ACDD5.8080007@gmail.com","subject":"Re: [PATCH] If deriving SVN_SSH from GIT_SSH on msys, also add quotes","fromName":"Sverre Rabbelier","fromEmail":"srabbelier@gmail.com","sentAt":"2010-01-23T11:22:27Z","receivedAt":"2010-01-23T11:22:27Z","isPatch":true,"sender":{"key":"srabbelier@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3098?v=4"},"body":"Heya,\n\nOn Sat, Jan 23, 2010 at 11:22, Sebastian Schuberth <sschuberth@gmail.com> wrote:\n> spaces. As GIT_SSH will not work if it contains quotes, it is save to\n\ns/save/safe/\n\n-- \nCheers,\n\nSverre Rabbelier\n"},{"id":"132482","messageId":"4B5B05AC.2050200@gmail.com","threadId":"22356","inReplyTo":"fabb9a1e1001230322t708756fahce326511d3f0bda5@mail.gmail.com","subject":"Re: [PATCH] If deriving SVN_SSH from GIT_SSH on msys, also add quotes","fromName":"Sebastian Schuberth","fromEmail":"sschuberth@gmail.com","sentAt":"2010-01-23T14:20:28Z","receivedAt":"2010-01-23T14:20:28Z","isPatch":true,"sender":{"key":"sschuberth@gmail.com","avatar":"https://avatars.githubusercontent.com/u/349154?v=4"},"body":"In contrast to GIT_SSH, SVN_SSH requires quotes for paths that contain\nspaces. As GIT_SSH will not work if it contains quotes, it is safe to\nassume it never contains quotes. Also, adding quotes to SVN_SSH for paths\nthat do not contain spaces does no harm. So we always add quotes when\nderiving SVN_SSH from GIT_SSH.\n\nThis fixes msysGit issue 385, see\nhttp://code.google.com/p/msysgit/issues/detail?id=385\n\nSigned-off-by: Sebastian Schuberth <sschuberth@gmail.com>\n---\n git-svn.perl |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex 650c9e5..ef39a9f 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -26,6 +26,7 @@ if (! exists $ENV{SVN_SSH}) {\n \t\t$ENV{SVN_SSH} = $ENV{GIT_SSH};\n \t\tif ($^O eq 'msys') {\n \t\t\t$ENV{SVN_SSH} =~ s/\\\\/\\\\\\\\/g;\n+\t\t\t$ENV{SVN_SSH} =~ s/(.*)/\"$1\"/;\n \t\t}\n \t}\n }\n-- \n1.6.6.265.ga0f40\n"},{"id":"132494","messageId":"7vd410d3as.fsf@alter.siamese.dyndns.org","threadId":"22356","inReplyTo":"4B5B05AC.2050200@gmail.com","subject":"Re: [PATCH] If deriving SVN_SSH from GIT_SSH on msys, also add quotes","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-01-23T19:33:31Z","receivedAt":"2010-01-23T19:33:31Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sebastian Schuberth <sschuberth@gmail.com> writes:\n\n> In contrast to GIT_SSH, SVN_SSH requires quotes for paths that contain\n> spaces. As GIT_SSH will not work if it contains quotes, it is safe to\n> assume it never contains quotes. Also, adding quotes to SVN_SSH for paths\n> that do not contain spaces does no harm. So we always add quotes when\n> deriving SVN_SSH from GIT_SSH.\n>\n> This fixes msysGit issue 385, see\n> http://code.google.com/p/msysgit/issues/detail?id=385\n>\n> Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>\n\nAs the patch clearly is inside \"msys-only\" codepath, I don't mind\nbypassing Eric and apply this directly to my tree before I tag 1.7.0-rc0,\nbut may I ask why this quoting magic matters only on msys?\n\n> ---\n>  git-svn.perl |    1 +\n>  1 files changed, 1 insertions(+), 0 deletions(-)\n>\n> diff --git a/git-svn.perl b/git-svn.perl\n> index 650c9e5..ef39a9f 100755\n> --- a/git-svn.perl\n> +++ b/git-svn.perl\n> @@ -26,6 +26,7 @@ if (! exists $ENV{SVN_SSH}) {\n>  \t\t$ENV{SVN_SSH} = $ENV{GIT_SSH};\n>  \t\tif ($^O eq 'msys') {\n>  \t\t\t$ENV{SVN_SSH} =~ s/\\\\/\\\\\\\\/g;\n> +\t\t\t$ENV{SVN_SSH} =~ s/(.*)/\"$1\"/;\n>  \t\t}\n>  \t}\n>  }\n> -- \n> 1.6.6.265.ga0f40\n"},{"id":"132501","messageId":"bdca99241001231211o97aa0eamacc40bf982a9f022@mail.gmail.com","threadId":"22356","inReplyTo":"7vd410d3as.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] If deriving SVN_SSH from GIT_SSH on msys, also add quotes","fromName":"Sebastian Schuberth","fromEmail":"sschuberth@gmail.com","sentAt":"2010-01-23T20:11:17Z","receivedAt":"2010-01-23T20:11:17Z","isPatch":true,"sender":{"key":"sschuberth@gmail.com","avatar":"https://avatars.githubusercontent.com/u/349154?v=4"},"body":"On Sat, Jan 23, 2010 at 20:33, Junio C Hamano <gitster@pobox.com> wrote:\n\n>> This fixes msysGit issue 385, see\n>> http://code.google.com/p/msysgit/issues/detail?id=385\n>>\n>> Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>\n>\n> As the patch clearly is inside \"msys-only\" codepath, I don't mind\n> bypassing Eric and apply this directly to my tree before I tag 1.7.0-rc0,\n> but may I ask why this quoting magic matters only on msys?\n\nTo be honest, I'm not exactly sure why this is required. Maybe the SVN\nPerl module does some different path mangling than a normal MSYS SVN\nbinary would do. We're already setting SVN_SSH like this (that is,\nusing double-backslashes and quotes) in the msysGit installer, see the\ndiscussion at [1]. This patch basically just does the same thing for\npeople that initially chose to not modify the environment during the\nmsysGit installation, but later change GIT_SSH manually, and forget to\nset SVN_SSH, too.\n\n[1] http://code.google.com/p/msysgit/issues/detail?id=305#c8\n\n-- \nSebastian Schuberth\n"}]}