void FilterFileList(List <VCFile> fileList, bool staged) { for (int i = fileList.Count - 1; i >= 0; i--) { // Check filter if (staged) { if (!stagedFilesFilter.Has(fileList[i].fileState1)) { fileList.RemoveAt(i); continue; } } else { if (!workingTreeFilter.Has(fileList[i].fileState2)) { fileList.RemoveAt(i); continue; } } } }