When branch filter is unset, cherri-picked commits should be un-highlighted. But when this happen during refresh, visible pack arrives with both new graph and new filters. So DeepComparator should check filters first.
+ String comparedBranch = myTask.myComparedBranch;
+ VcsLogBranchFilter branchFilter = dataPack.getFilters().getBranchFilter();
+ if (branchFilter == null || !myTask.myComparedBranch.equals(VcsLogUtil.getSingleFilteredBranch(branchFilter, dataPack.getRefs()))) {
+ stopAndUnhighlight();
+ return;
+ }
+
- // collect data
- String comparedBranch = myTask.myComparedBranch;
Map<GitRepository, GitBranch> repositoriesWithCurrentBranches = myTask.myRepositoriesWithCurrentBranches;
VcsLogDataProvider provider = myTask.myProvider;
Map<GitRepository, GitBranch> repositoriesWithCurrentBranches = myTask.myRepositoriesWithCurrentBranches;
VcsLogDataProvider provider = myTask.myProvider;
// highlight again
Map<GitRepository, GitBranch> repositories = getRepositories(dataPack.getLogProviders(), comparedBranch);
// highlight again
Map<GitRepository, GitBranch> repositories = getRepositories(dataPack.getLogProviders(), comparedBranch);
- if (repositories.equals(repositoriesWithCurrentBranches)) { // but not if current branch changed
+ if (repositories.equals(repositoriesWithCurrentBranches)) {
+ // but not if current branch changed
highlightInBackground(comparedBranch, provider);
}
highlightInBackground(comparedBranch, provider);
}
- }
- else {
- VcsLogBranchFilter branchFilter = dataPack.getFilters().getBranchFilter();
- if (branchFilter == null || !myTask.myComparedBranch.equals(VcsLogUtil.getSingleFilteredBranch(branchFilter, dataPack.getRefs()))) {
- stopAndUnhighlight();
+ else {
+ removeHighlighting();
handler.runInCurrentThread(null);
return pickedCommits;
}
handler.runInCurrentThread(null);
return pickedCommits;
}
}
}
\ No newline at end of file
}
}
\ No newline at end of file