aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMykola Nikishov2009-11-25 15:50:21 (EST)
committerShawn O. Pearce2009-11-30 19:58:37 (EST)
commit0dcbff3a776ea3f8341a7176d3f774032b589616 (patch)
treed75f0b7008cf7b79bf28efd47a9a5a512b7415cc
parente601f8c347675f76fcbfbf1591bc52b7c511c2e6 (diff)
downloadegit-0dcbff3a776ea3f8341a7176d3f774032b589616.zip
egit-0dcbff3a776ea3f8341a7176d3f774032b589616.tar.gz
egit-0dcbff3a776ea3f8341a7176d3f774032b589616.tar.bz2
Replace hard-coded remote name with Constants.DEFAULT_REMOTE_NAMErefs/changes/14/114/3
Change-Id: I66419ffab7078f623f2942a75a01274699825b19 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/CloneDestinationPage.java2
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/components/RepositorySelectionPage.java7
2 files changed, 4 insertions, 5 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/CloneDestinationPage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/CloneDestinationPage.java
index 71572f3..e5a5f38 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/CloneDestinationPage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/CloneDestinationPage.java
@@ -163,7 +163,7 @@ class CloneDestinationPage extends WizardPage {
newLabel(g, UIText.CloneDestinationPage_promptRemoteName + ":"); //$NON-NLS-1$
remoteText = new Text(g, SWT.BORDER);
- remoteText.setText("origin"); //$NON-NLS-1$
+ remoteText.setText(Constants.DEFAULT_REMOTE_NAME);
remoteText.setLayoutData(createFieldGridData());
remoteText.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/components/RepositorySelectionPage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/components/RepositorySelectionPage.java
index f9ff9d7..192a11f 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/components/RepositorySelectionPage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/components/RepositorySelectionPage.java
@@ -36,6 +36,7 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
+import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.transport.RemoteConfig;
import org.eclipse.jgit.transport.URIish;
import org.eclipse.jgit.util.FS;
@@ -47,8 +48,6 @@ import org.eclipse.jgit.util.FS;
public class RepositorySelectionPage extends BaseWizardPage {
private static final int REMOTE_CONFIG_TEXT_MAX_LENGTH = 80;
- private static final String DEFAULT_REMOTE_NAME = "origin"; //$NON-NLS-1$
-
private static final int S_GIT = 0;
private static final int S_SSH = 1;
@@ -132,7 +131,7 @@ public class RepositorySelectionPage extends BaseWizardPage {
* @param configuredRemotes
* list of configured remotes that user may select as an
* alternative to manual URI specification. Remotes appear in
- * given order in GUI, with {@value #DEFAULT_REMOTE_NAME} as the
+ * given order in GUI, with {@value Constants#DEFAULT_REMOTE_NAME} as the
* default choice. List may be null or empty - no remotes
* configurations appear in this case. Note that the provided
* list may be changed by this constructor.
@@ -495,7 +494,7 @@ public class RepositorySelectionPage extends BaseWizardPage {
private RemoteConfig selectDefaultRemoteConfig() {
for (final RemoteConfig rc : configuredRemotes)
- if (getTextForRemoteConfig(rc) == DEFAULT_REMOTE_NAME)
+ if (Constants.DEFAULT_REMOTE_NAME.equals(getTextForRemoteConfig(rc)))
return rc;
return configuredRemotes.get(0);
}