private void WorkTreeChanged(object sender, FileSystemEventArgs e) { var fileName = GitCommandHelpers.FixPath(e.FullPath.Substring(_workTreeWatcher.Path.Length)); if (_ignoredFiles.Contains(fileName)) { return; } if (e.FullPath.StartsWith(_gitPath)) { GitDirChanged(sender, e); return; } // new submodule .git file if (e.FullPath.EndsWith("\\.git")) { return; } // old submodule .git\index.lock file if (e.FullPath.EndsWith("\\.git\\index.lock")) { return; } ScheduleDeferredUpdate(); }
public bool SolveGitCredentialStore() { if (!CheckGitCredentialStore()) { string gcsFileName = Path.Combine(AppSettings.GetInstallDir(), @"GitCredentialWinStore\git-credential-winstore.exe"); if (File.Exists(gcsFileName)) { var config = GlobalConfigFileSettings; if (EnvUtils.RunningOnWindows()) { config.SetValue("credential.helper", "!\\\"" + GitCommandHelpers.FixPath(gcsFileName) + "\\\""); } else if (EnvUtils.RunningOnMacOSX()) { config.SetValue("credential.helper", "osxkeychain"); } else { config.SetValue("credential.helper", "cache --timeout=300"); // 5 min } return(true); } return(false); } return(true); }
public bool SolveGitCredentialStore() { if (!ChecklistSettingsPage.CheckGitCredentialStore()) { string gcsFileName = Settings.GetInstallDir() + @"\GitCredentialWinStore\git-credential-winstore.exe"; if (File.Exists(gcsFileName)) { ConfigFile config = GitCommandHelpers.GetGlobalConfig(); if (Settings.RunningOnWindows()) { config.SetValue("credential.helper", "!\\\"" + GitCommandHelpers.FixPath(gcsFileName) + "\\\""); } else if (Settings.RunningOnMacOSX()) { config.SetValue("credential.helper", "osxkeychain"); } else { config.SetValue("credential.helper", "cache --timeout=300"); // 5 min } config.Save(); return(true); } return(false); } return(true); }