Skip to content
Permalink
Browse files

[JENKINS-43507] Fix invalid implicit assumption that remote name is a…

…lways `origin`
  • Loading branch information...
stephenc committed May 3, 2017
1 parent 7fd9e9f commit aaaa28b2e3ed0f094a66e54c3266a63a9da7965c
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/main/java/jenkins/plugins/git/GitSCMSource.java
@@ -168,7 +168,7 @@ public GitSCMSource(String id, String remote, String credentialsId, String remot
if (!DEFAULT_INCLUDES.equals(includes) || !DEFAULT_EXCLUDES.equals(excludes)) {
traits.add(new WildcardSCMHeadFilterTrait(includes, excludes));
}
if (!"origin".equals(remoteName) && StringUtils.isNotBlank(remoteName)) {
if (!DEFAULT_REMOTE_NAME.equals(remoteName) && StringUtils.isNotBlank(remoteName)) {
traits.add(new RemoteNameSCMSourceTrait(remoteName));
}
if (ignoreOnPushNotifications) {
@@ -218,7 +218,7 @@ private Object readResolve() throws ObjectStreamException {
}
}
}
if (remoteName != null && !"origin".equals(remoteName) && StringUtils.isNotBlank(remoteName)) {
if (remoteName != null && !DEFAULT_REMOTE_NAME.equals(remoteName) && StringUtils.isNotBlank(remoteName)) {
traits.add(new RemoteNameSCMSourceTrait(remoteName));
}
if (StringUtils.isNotBlank(gitTool)) {

0 comments on commit aaaa28b

Please sign in to comment.
You can’t perform that action at this time.