OSDN Git Service

Fix Issue #142: TortoiseGit Clone of SVN repo does not use PuTTY session for non...
authorFrank Li <lznuaa@gmail.com>
Fri, 14 Aug 2009 11:26:27 +0000 (19:26 +0800)
committerFrank Li <lznuaa@gmail.com>
Fri, 14 Aug 2009 11:26:27 +0000 (19:26 +0800)
Signed-off-by: Frank Li <lznuaa@gmail.com>
src/Git/Git.cpp

index 0d00b9a..46fc9bc 100644 (file)
@@ -845,6 +845,14 @@ BOOL CGit::CheckMsysGitDir()
        if(!sshclient.IsEmpty())\r
        {\r
                _tputenv_s(_T("GIT_SSH"),sshclient);\r
+               \r
+               //Setup SVN_SSH\r
+               CString ssh=sshclient;\r
+               ssh.Replace(_T("/"),_T("\\"));\r
+               ssh.Replace(_T("\\"),_T("\\\\"));\r
+               ssh=CString(_T("\""))+ssh+_T('\"');\r
+               _tputenv_s(_T("SVN_SSH"),ssh);\r
+\r
        }else\r
        {\r
                TCHAR sPlink[MAX_PATH];\r
@@ -853,6 +861,13 @@ BOOL CGit::CheckMsysGitDir()
                if (ptr) {\r
                        _tcscpy(ptr + 1, _T("TortoisePlink.exe"));\r
                        _tputenv_s(_T("GIT_SSH"), sPlink);\r
+\r
+                       //Setup SVN_SSH\r
+                       CString ssh=sPlink;\r
+                       ssh.Replace(_T("/"),_T("\\"));\r
+                       ssh.Replace(_T("\\"),_T("\\\\"));\r
+                       ssh=CString(_T("\""))+ssh+_T('\"');\r
+                       _tputenv_s(_T("SVN_SSH"),ssh);\r
                }\r
        }\r
 \r