예제 #1
0
        private List <CommitInfo> Parse(List <string> lines)
        {
            List <CommitInfo> output = new List <CommitInfo>();

            foreach (string line in lines)
            {
                string[] splited = line.Split('`');

                CommitInfo info = new CommitInfo();
                info.Graph = splited[0];

                if (splited.Length > 5)
                {
                    info.LocalTimeDate = splited[1];
                    info.Sha           = splited[2];
                    info.Author        = splited[3];
                    info.RefNames      = splited[4];
                    info.Message       = splited[5];
                }
                output.Add(info);
            }
            return(output);
        }
예제 #2
0
파일: GitWrapper.cs 프로젝트: zelon/wimygit
        private List<CommitInfo> Parse(List<string> lines)
        {
            List<CommitInfo> output = new List<CommitInfo>();
            foreach (string line in lines)
            {
                string[] splited = line.Split('`');

                CommitInfo info = new CommitInfo();
                info.Graph = splited[0];

                if (splited.Length > 5)
                {
                    info.LocalTimeDate = splited[1];
                    info.Sha = splited[2];
                    info.Author = splited[3];
                    info.RefNames = splited[4];
                    info.Message = splited[5];
                }
                output.Add(info);
            }
            return output;
        }
예제 #3
0
 private string MakeDetail(CommitInfo commit)
 {
     if (String.IsNullOrEmpty(commit.Sha))
     {
         return "No detail";
     }
     var builder = new System.Text.StringBuilder();
     builder.Append("Author: " + commit.Author);
     builder.Append("\n");
     builder.Append("Date: " + commit.LocalTimeDate);
     builder.Append("\n");
     builder.Append("Commit Id: " + commit.Sha);
     builder.Append("\n");
     builder.Append(commit.Message);
     builder.Append("\n");
     return builder.ToString();
 }