Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf2018-05-25 12:36:06 -0400
committerThomas Wolf2018-05-25 12:37:44 -0400
commitc4a3e2b6f8c03bc4d980aac8c616218b457a870f (patch)
tree7db73945d4f64d7632a4146bce2c97767dfc3cd4
parent373ce7ec8e2ba67837e8f87e6cee50ce0fbe0a64 (diff)
downloadegit-c4a3e2b6f8c03bc4d980aac8c616218b457a870f.tar.gz
egit-c4a3e2b6f8c03bc4d980aac8c616218b457a870f.tar.xz
egit-c4a3e2b6f8c03bc4d980aac8c616218b457a870f.zip
Natural sort for refs in FetchResultTable
This gives a better ordering in particular for fetched tags, sorting a new fetched tag v2.10.0 after a tag v2.9.0. Change-Id: Ibcab9d5fd117518aa1028124023feb36a10a7495 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/fetch/FetchResultTable.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/fetch/FetchResultTable.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/fetch/FetchResultTable.java
index 2a3ee5c9f..774ffba55 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/fetch/FetchResultTable.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/fetch/FetchResultTable.java
@@ -16,6 +16,7 @@ import java.util.Map;
import org.eclipse.egit.ui.Activator;
import org.eclipse.egit.ui.UIUtils;
+import org.eclipse.egit.ui.internal.CommonUtils;
import org.eclipse.egit.ui.internal.DecorationOverlayDescriptor;
import org.eclipse.egit.ui.internal.UIIcons;
import org.eclipse.egit.ui.internal.UIText;
@@ -312,7 +313,8 @@ class FetchResultTable {
&& f2.getChildren(f2).length > 0)
return -1;
- return f1.getLabel(f1).compareToIgnoreCase(f2.getLabel(f2));
+ return CommonUtils.STRING_ASCENDING_COMPARATOR
+ .compare(f1.getLabel(f1), f2.getLabel(f2));
}
// Leave commits order alone

Back to the top