src/SyncTool.Git/main/FileSystem/Versioning/GitBasedFileSystemHistory.cs
/// <summary>
/// Gets the first parent of the specified commit that is a snapshot or
/// the initial commit of the repository if the specified commit is the first snapshot in the history
/// </summary>
Gets the first parent of the specified commit that is a snapshot or
the initial commit of the repository if the specified commit is the first snapshot in the history
Gets the first parent of the specified commit that is a snapshot or the initial commit of the repository if the specified commit is the first snapshot in the history
Commit GetParentSnapshotCommit(Commit commit)
        {
            var currentCommit = commit.Parents.Single();
            var initialCommit = m_Repository.GetInitialCommit();
            while (true)
            {
                if (currentCommit.Sha == initialCommit.Sha || SnapshotExists(currentCommit.Sha))
                {
                    return currentCommit;
                }
                currentCommit = currentCommit.Parents.Single();
            }
        }
Commit GetParentSnapshotCommit ( Commit commit ) { var currentCommit = commit . Parents . Single ( ) ; var initialCommit = m_Repository . GetInitialCommit ( ) ; while ( true ) { if ( currentCommit . Sha == initialCommit . Sha || SnapshotExists ( currentCommit . Sha ) ) { return currentCommit ; } currentCommit = currentCommit . Parents . Single ( ) ; } }
Gets the first parent of the specified commit that is a snapshot or
the initial commit of the repository if the specified commit is the first snapshot in the history
Gets the first parent of the specified commit that is a snapshot or the initial commit of the repository if the specified commit is the first snapshot in the history
commit
Commit