public static string GetCommitMessage(GitModule module) { if (File.Exists(CommitHelper.GetCommitMessagePath(module))) { return(File.ReadAllText(CommitHelper.GetCommitMessagePath(module), module.CommitEncoding)); } return(string.Empty); }
public static bool GetAmendState(GitModule module) { bool amendState = false; if (AppSettings.RememberAmendCommitState && File.Exists(CommitHelper.GetAmendPath(module))) { var amendSaveStateFilePath = CommitHelper.GetAmendPath(module); bool.TryParse(File.ReadAllText(amendSaveStateFilePath), out amendState); try { File.Delete(amendSaveStateFilePath); } catch (Exception) { } } return(amendState); }