From 005d194d738cb3552657d5e27fe8f1e8d2a12b09 Mon Sep 17 00:00:00 2001 From: Constantine Plotnikov Date: Tue, 3 Aug 2010 12:13:31 +0400 Subject: [PATCH] git4idea: Added sorting of roots in switch branches dialog --- .../git4idea/checkout/branches/GitSwitchBranchesDialog.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/git4idea/src/git4idea/checkout/branches/GitSwitchBranchesDialog.java b/plugins/git4idea/src/git4idea/checkout/branches/GitSwitchBranchesDialog.java index b90987d5186f..4617b519c869 100644 --- a/plugins/git4idea/src/git4idea/checkout/branches/GitSwitchBranchesDialog.java +++ b/plugins/git4idea/src/git4idea/checkout/branches/GitSwitchBranchesDialog.java @@ -168,6 +168,12 @@ public class GitSwitchBranchesDialog extends DialogWrapper { else { myBranches = prepareBranchDescriptors(target, roots); } + Collections.sort(myBranches, new Comparator() { + @Override + public int compare(BranchDescriptor o1, BranchDescriptor o2) { + return o1.getRoot().compareTo(o2.getRoot()); + } + }); if (target == null) { myNameTextField.setText(generateNewConfigurationName()); }