[EGIT PATCH 2/3] Use Constants.R_* in Branch dialog

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There were a few places that didn't use these constants

Signed-off-by: Robin Rosenberg <robin.rosenberg@xxxxxxxxxx>
---
 .../ui/internal/dialogs/BranchSelectionDialog.java |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/dialogs/BranchSelectionDialog.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/dialogs/BranchSelectionDialog.java
index 1866086..9aad95b 100644
--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/dialogs/BranchSelectionDialog.java
+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/dialogs/BranchSelectionDialog.java
@@ -154,19 +154,19 @@ private void fillTreeWithBranches(String select) throws IOException {
 
 		for (String ref : branches) {
 			String shortName = ref;
-			if (ref.startsWith("refs/heads/")) {
+			if (ref.startsWith(Constants.R_HEADS)) {
 				shortName = ref.substring(11);
-				if (!"refs/heads/".equals(curPrefix)) {
-					curPrefix = "refs/heads/";
+				if (!Constants.R_HEADS.equals(curPrefix)) {
+					curPrefix = Constants.R_HEADS;
 					curSubPrefix = null;
 					curSubItem = null;
 					curItem = new TreeItem(branchTree, SWT.NONE);
 					curItem.setText(UIText.BranchSelectionDialog_LocalBranches);
 				}
-			} else if (ref.startsWith("refs/remotes/")) {
+			} else if (ref.startsWith(Constants.R_REMOTES)) {
 				shortName = ref.substring(13);
-				if (!"refs/remotes/".equals(curPrefix)) {
-					curPrefix = "refs/remotes/";
+				if (!Constants.R_REMOTES.equals(curPrefix)) {
+					curPrefix = Constants.R_REMOTES;
 					curItem = new TreeItem(branchTree, SWT.NONE);
 					curItem.setText(UIText.BranchSelectionDialog_RemoteBranches);
 					curSubItem = null;
@@ -186,10 +186,10 @@ private void fillTreeWithBranches(String select) throws IOException {
 					curSubItem = null;
 					curSubPrefix = null;
 				}
-			} else if (ref.startsWith("refs/tags/")) {
+			} else if (ref.startsWith(Constants.R_TAGS)) {
 				shortName = ref.substring(10);
-				if (!"refs/tags/".equals(curPrefix)) {
-					curPrefix = "refs/tags/";
+				if (!Constants.R_HEADS.equals(curPrefix)) {
+					curPrefix = Constants.R_TAGS;
 					curSubPrefix = null;
 					curSubItem = null;
 					curItem = new TreeItem(branchTree, SWT.NONE);
-- 
1.6.3.rc2.1.g868b6

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]