Example #1
0
        public BranchInfo GetCurrentBranchInfo()
        {
            string              cmd                 = "status";
            List <string>       results             = CreateGitRunner().Run(cmd);
            GitRepositoryStatus gitRepositoryStatus = GitStatusParser.Parse(results);

            return(gitRepositoryStatus.branchInfo);
        }
Example #2
0
        public GitRepositoryStatus GetRepositoryStatus()
        {
            string              cmd                 = "status";
            List <string>       results             = CreateGitRunner().Run(cmd);
            GitRepositoryStatus gitRepositoryStatus = GitStatusParser.Parse(results);

            return(gitRepositoryStatus);
        }
Example #3
0
        public static GitRepositoryStatus Parse(List <string> results)
        {
            if (results.Count <= 0 || results[0].StartsWith("fatal"))
            {
                return(null);
            }
            GitRepositoryStatus gitRepositoryStatus = new GitRepositoryStatus();

            gitRepositoryStatus.branchInfo    = ParseBranchInfo(results);
            gitRepositoryStatus.IsOnBisecting = ParseBisectInfo(results);

            return(gitRepositoryStatus);
        }