From 2f4df6f3cba36dd0ed96502550a1f2ab07a2d938 Mon Sep 17 00:00:00 2001 From: Kirill Likhodedov Date: Mon, 13 Feb 2012 17:41:58 +0400 Subject: [PATCH] cosmetics --- .../ui/branch/GitMultiRootBranchConfig.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/plugins/git4idea/src/git4idea/ui/branch/GitMultiRootBranchConfig.java b/plugins/git4idea/src/git4idea/ui/branch/GitMultiRootBranchConfig.java index 4d5c1ee94cc1..bc39ea6133de 100644 --- a/plugins/git4idea/src/git4idea/ui/branch/GitMultiRootBranchConfig.java +++ b/plugins/git4idea/src/git4idea/ui/branch/GitMultiRootBranchConfig.java @@ -152,19 +152,20 @@ public class GitMultiRootBranchConfig { @NotNull private Collection getCommonBranches(boolean local) { - Collection commonLocal = null; + Collection commonBranches = null; for (GitRepository repository : myRepositories) { GitBranchesCollection branchesCollection = repository.getBranches(); Collection branches = local ? branchesCollection.getLocalBranches() : branchesCollection.getRemoteBranches(); - if (commonLocal == null) { - commonLocal = GitUtil.getBranchNames(branches); - } else { - commonLocal.retainAll(GitUtil.getBranchNames(branches)); + if (commonBranches == null) { + commonBranches = GitUtil.getBranchNames(branches); + } + else { + commonBranches.retainAll(GitUtil.getBranchNames(branches)); } } - if (commonLocal != null) { - ArrayList common = new ArrayList(commonLocal); + if (commonBranches != null) { + ArrayList common = new ArrayList(commonBranches); Collections.sort(common); return common; }