string GetActionText(GitNotifyAction action) { string actionText = action.ToString(); switch (action) { case GitNotifyAction.UpdateAdd: case GitNotifyAction.UpdateDelete: case GitNotifyAction.UpdateReplace: case GitNotifyAction.UpdateUpdate: case GitNotifyAction.UpdateCompleted: case GitNotifyAction.UpdateExternal: actionText = actionText.Substring(6); break; case GitNotifyAction.CommitAdded: case GitNotifyAction.CommitDeleted: case GitNotifyAction.CommitModified: case GitNotifyAction.CommitReplaced: actionText = actionText.Substring(6); break; case GitNotifyAction.CommitSendData: actionText = "Sending"; break; case GitNotifyAction.BlameRevision: actionText = "Annotating"; break; } return actionText; }
private void RaiseNotifyFromDiff(Repository repository, ICollection<string> paths, GitNotifyAction action) { foreach (string path in paths) { RaiseNotify(new GitNotifyEventArgs { Action = action, CommandType = Args.CommandType, ContentState = GitNotifyState.Unknown, FullPath = repository.GetAbsoluteRepositoryPath(path), NodeKind = GitNodeKind.Unknown }); } }