Sep.Git.Tfs.Core.GitTfsRemote.InitHistory C# (CSharp) Method

InitHistory() private method

private InitHistory ( ) : void
return void
        private void InitHistory()
        {
            if (maxChangesetId == null)
            {
                var mostRecentUpdate = Repository.GetLastParentTfsCommits(RemoteRef).FirstOrDefault();
                if (mostRecentUpdate != null)
                {
                    MaxCommitHash = mostRecentUpdate.GitCommit;
                    MaxChangesetId = mostRecentUpdate.ChangesetId;
                }
                else
                {
                    MaxChangesetId = 0;
                    //Manage the special case where a .gitignore has been commited
                    try
                    {
                        var gitCommit = Repository.GetCommit(RemoteRef);
                        if (gitCommit != null)
                        {
                            MaxCommitHash = gitCommit.Sha;
                        }
                    }
                    catch (Exception)
                    {
                    }
                }
            }
        }