Author: adietish
Date: 2011-08-24 11:08:34 -0400 (Wed, 24 Aug 2011)
New Revision: 34228
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.egit.core/src/org/jboss/ide/eclipse/as/egit/core/EGitUtils.java
Log:
[JBIDE-9575] using default remote name if there's no current branch or no remote
configured to the current branch.
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.egit.core/src/org/jboss/ide/eclipse/as/egit/core/EGitUtils.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.egit.core/src/org/jboss/ide/eclipse/as/egit/core/EGitUtils.java 2011-08-24
14:18:12 UTC (rev 34227)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.egit.core/src/org/jboss/ide/eclipse/as/egit/core/EGitUtils.java 2011-08-24
15:08:34 UTC (rev 34228)
@@ -366,7 +366,9 @@
}
/**
- * Returns the name of the remote repository of the given branch.
+ * Returns the name of the remote repository of the given branch. If there's
+ * no current branch or no remote configured to it, the default remote is
+ * returned ("origin").
*
* @param branch
* the branch
@@ -383,6 +385,11 @@
ConfigConstants.CONFIG_BRANCH_SECTION, branch,
ConfigConstants.CONFIG_REMOTE_SECTION);
}
+
+ if (remoteName == null) {
+ remoteName = Constants.DEFAULT_REMOTE_NAME;
+ }
+
return remoteName;
}
Show replies by date