예제 #1
0
        private string DescribeRevision(string sha1)
        {
            var revision = _revisionGrid.GetRevision(sha1);

            if (revision == null)
            {
                return(sha1.ShortenTo(8));
            }

            return(_revisionGrid.DescribeRevision(revision));
        }
예제 #2
0
        private string DescribeRevision(string sha1, int maxLength = 0)
        {
            if (sha1.IsNullOrEmpty())
            {
                // No parent at all, present as working directory
                return(Strings.GetCurrentUnstagedChanges());
            }

            var revision = _revisionGrid.GetRevision(sha1);

            if (revision == null)
            {
                return(sha1.ShortenTo(8));
            }

            return(_revisionGrid.DescribeRevision(revision, maxLength));
        }