OSDN Git Service

Workaround Issue 73: Error while reading/writing the registry key MSysGit Access...
[tortoisegit/TortoiseGitJp.git] / src / Git / Git.cpp
index 2ec2733..49a5059 100644 (file)
@@ -801,7 +801,7 @@ BOOL CGit::CheckMsysGitDir()
 \r
        // add git/bin path to PATH\r
 \r
-       CRegString msysdir=CRegString(REG_MSYSGIT_PATH,_T(""),FALSE,HKEY_LOCAL_MACHINE);\r
+       CRegString msysdir=CRegString(REG_MSYSGIT_PATH,_T(""),FALSE);\r
        CString str=msysdir;\r
        if(str.IsEmpty())\r
        {\r
@@ -1062,23 +1062,23 @@ int CGit::Revert(CTGitPath &path,bool keep)
        if(path.m_Action & CTGitPath::LOGACTIONS_ADDED)\r
        {       //To init git repository, there are not HEAD, so we can use git reset command\r
                cmd.Format(_T("git.exe rm --cache -- \"%s\""),path.GetGitPathString());\r
-               if(g_Git.Run(cmd,&out,CP_OEMCP))\r
+               if(g_Git.Run(cmd,&out,CP_ACP))\r
                        return -1;\r
        }\r
        else if(path.m_Action & CTGitPath::LOGACTIONS_REPLACED )\r
        {\r
                cmd.Format(_T("git.exe mv \"%s\" \"%s\""),path.GetGitPathString(),path.GetGitOldPathString());\r
-               if(g_Git.Run(cmd,&out,CP_OEMCP))\r
+               if(g_Git.Run(cmd,&out,CP_ACP))\r
                        return -1;\r
                \r
                cmd.Format(_T("git.exe checkout HEAD -f -- \"%s\""),path.GetGitOldPathString());\r
-               if(g_Git.Run(cmd,&out,CP_OEMCP))\r
+               if(g_Git.Run(cmd,&out,CP_ACP))\r
                        return -1;\r
        }\r
        else\r
        {\r
                cmd.Format(_T("git.exe checkout HEAD -f -- \"%s\""),path.GetGitPathString());\r
-               if(g_Git.Run(cmd,&out,CP_OEMCP))\r
+               if(g_Git.Run(cmd,&out,CP_ACP))\r
                        return -1;\r
        }\r
        return 0;\r