//initialize git setting from register public static bool InitSetting(CGitSourceModule GitSrcModule,CGitSourceLog GitLog) { m_szGitSourceCmd = GetGitExRegValue(); if (false==File.Exists(m_szGitSourceCmd)) return false; m_szGitBinDir = CHelpFuntions.GetDirFromFile(m_szGitSourceCmd); m_szCustomHomeDir=""; m_szUserHomeDir = true; if (GitSrcModule != null&&GitLog != null) { m_objGitLog = GitLog; m_objGitSrcModule = GitSrcModule; } else { return false; } return true; }
public static void SetupSystemEncoding(CGitSourceModule Module) { //check whether GitExtensions works with standard msysgit or msysgit-unicode String controlStr = "ą"; int exitCode; String s = Module.RunGitCmd(controlStr, out exitCode, null, Encoding.UTF8); if (s != null && s.IndexOf(controlStr) != -1) m_SystemEncoding = Encoding.UTF8; else m_SystemEncoding = Encoding.Default; }
public bool Initizlize() { // string szGitSourceCmd= CGitSourceConfig.GetGitExRegValue(); if (string.IsNullOrEmpty(szGitSourceCmd)) { return false; } // _objGitSourceModule = new CGitSourceModule(null, szGitSourceCmd); if (null == _objGitSourceModule) { return false; } // _objGitLog=new CGitSourceLog(); // if (false == CGitSourceConfig.InitSetting(_objGitSourceModule, _objGitLog)) { return false; } // CGitSourceConfig.SetupSystemEncoding(_objGitSourceModule); // return true; }