GitUI.RevisionGrid.SearchRevision C# (CSharp) 메소드

SearchRevision() 개인적인 메소드

private SearchRevision ( string initRevision ) : int
initRevision string
리턴 int
        private int SearchRevision(string initRevision)
        {
            var exactIndex = Revisions.TryGetRevisionIndex(initRevision);
            if (exactIndex.HasValue)
                return exactIndex.Value;

            foreach (var parentHash in GetAllParents(initRevision))
            {
                var parentIndex = Revisions.TryGetRevisionIndex(parentHash);
                if (parentIndex.HasValue)
                    return parentIndex.Value;
            }

            return -1;
        }
RevisionGrid