// line contains commitid followed by one or more parentIds private void AddCommitToParentsGraph(string line) { char[] space = new char[] { ' ' }; string[] commitAndParents = line.Split(space, 2); string commitId = commitAndParents[0]; CommitData ownData = ProvideCommitData(commitId); if ((commitAndParents.Length > 1) && commitAndParents[1].IsNotNullOrWhitespace()) { string[] parents = commitAndParents[1].Split(space); foreach (string parentId in parents) { ownData.AddParent(parentId); CommitData parentData = ProvideCommitData(parentId); parentData.AddChild(commitId); } } }