Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Munteanu2011-06-08 21:30:27 +0000
committerChristian Halstrick2011-06-30 14:47:25 +0000
commit9e3c2feda5e5535b4ee4f7583a54dca562b4b2ef (patch)
treeac776e0187c634ba7125910c6c99b334b1fed5d4 /org.eclipse.egit.mylyn.ui/src/org
parentaabcc06f12972f5c10857f4e3677393c155fec28 (diff)
downloadegit-9e3c2feda5e5535b4ee4f7583a54dca562b4b2ef.tar.gz
egit-9e3c2feda5e5535b4ee4f7583a54dca562b4b2ef.tar.xz
egit-9e3c2feda5e5535b4ee4f7583a54dca562b4b2ef.zip
TaskReferenceFactory: use constants instead of hardcoded strings
Diffstat (limited to 'org.eclipse.egit.mylyn.ui/src/org')
-rw-r--r--org.eclipse.egit.mylyn.ui/src/org/eclipse/egit/internal/mylyn/ui/commit/TaskReferenceFactory.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/org.eclipse.egit.mylyn.ui/src/org/eclipse/egit/internal/mylyn/ui/commit/TaskReferenceFactory.java b/org.eclipse.egit.mylyn.ui/src/org/eclipse/egit/internal/mylyn/ui/commit/TaskReferenceFactory.java
index aaeabc07fa..a03536ace5 100644
--- a/org.eclipse.egit.mylyn.ui/src/org/eclipse/egit/internal/mylyn/ui/commit/TaskReferenceFactory.java
+++ b/org.eclipse.egit.mylyn.ui/src/org/eclipse/egit/internal/mylyn/ui/commit/TaskReferenceFactory.java
@@ -24,6 +24,8 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.egit.core.Activator;
import org.eclipse.egit.internal.mylyn.ui.EGitMylynUI;
import org.eclipse.egit.ui.internal.synchronize.model.GitModelCommit;
+import org.eclipse.jgit.lib.ConfigConstants;
+import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.revwalk.RevCommit;
import org.eclipse.jgit.revwalk.RevWalk;
@@ -137,7 +139,8 @@ public class TaskReferenceFactory implements IAdapterFactory {
private static String getRepoUrl(Repository repo) {
String configuredUrl = repo.getConfig().getString(BUGTRACK_SECTION, null, BUGTRACK_URL);
- String originUrl = repo.getConfig().getString("remote", "origin", "url"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ String originUrl = repo.getConfig().getString(ConfigConstants.CONFIG_REMOTE_SECTION,
+ Constants.DEFAULT_REMOTE_NAME, ConfigConstants.CONFIG_KEY_URL);
return configuredUrl != null ? configuredUrl : originUrl;
}

Back to the top