private static List<PendingChange> GetPendingChangesByFile(List<MergeRelation> mergeRelationships, string targetBranch, Workspace workspace)
{
var itemSpecs = new List<ItemSpec>();
foreach (var mergeRelationship in mergeRelationships)
{
if (mergeRelationship.Target.StartsWith(targetBranch))
{
var recursionType = CalculateRecursionType(mergeRelationship);
itemSpecs.Add(new ItemSpec(mergeRelationship.Target, recursionType));
}
}
return workspace.GetPendingChanges(itemSpecs.ToArray()).ToList();
}