internal void RemoveBranch(string repository, string branchId) { List <Branch> queuedBranches = GetQueuedBranches(); int index = BranchFinder.IndexOf(queuedBranches, repository, branchId); if (index == -1) { return; } queuedBranches.RemoveAt(index); Write(queuedBranches); }
void FilterAlreadyTrackedBranches( List <Branch> branchesToFilter, List <Branch> alreadyTrackedBranches) { if (alreadyTrackedBranches.Count == 0) { return; } for (int i = branchesToFilter.Count - 1; i >= 0; i--) { if (BranchFinder.IndexOf(alreadyTrackedBranches, branchesToFilter[i].Repository, branchesToFilter[i].Id) == -1) { continue; } branchesToFilter.RemoveAt(i); } }
internal bool Contains(string repository, string branchId) { List <Branch> branches = GetQueuedBranches(); return(BranchFinder.IndexOf(branches, repository, branchId) > -1); }