diff --git a/plugins/git4idea/src/git4idea/repo/GitRepoInfo.java b/plugins/git4idea/src/git4idea/repo/GitRepoInfo.java index 5e71115b5aa3..cbeb0c4268b1 100644 --- a/plugins/git4idea/src/git4idea/repo/GitRepoInfo.java +++ b/plugins/git4idea/src/git4idea/repo/GitRepoInfo.java @@ -22,6 +22,8 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.Collection; +import java.util.LinkedHashSet; +import java.util.Set; /** * @author Kirill Likhodedov @@ -31,10 +33,10 @@ public class GitRepoInfo { @Nullable private final GitLocalBranch myCurrentBranch; @Nullable private final String myCurrentRevision; @NotNull private final Repository.State myState; - @NotNull private final Collection myRemotes; - @NotNull private final Collection myLocalBranches; - @NotNull private final Collection myRemoteBranches; - @NotNull private final Collection myBranchTrackInfos; + @NotNull private final Set myRemotes; + @NotNull private final Set myLocalBranches; + @NotNull private final Set myRemoteBranches; + @NotNull private final Set myBranchTrackInfos; public GitRepoInfo(@Nullable GitLocalBranch currentBranch, @Nullable String currentRevision, @NotNull Repository.State state, @NotNull Collection remotes, @NotNull Collection localBranches, @@ -42,10 +44,10 @@ public class GitRepoInfo { myCurrentBranch = currentBranch; myCurrentRevision = currentRevision; myState = state; - myRemotes = remotes; - myLocalBranches = localBranches; - myRemoteBranches = remoteBranches; - myBranchTrackInfos = branchTrackInfos; + myRemotes = new LinkedHashSet(remotes); + myLocalBranches = new LinkedHashSet(localBranches); + myRemoteBranches = new LinkedHashSet(remoteBranches); + myBranchTrackInfos = new LinkedHashSet(branchTrackInfos); } @Nullable