Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[JENKINS-43507] Fix invalid implicit assumption that remote name is a…
…lways `origin`
  • Loading branch information
stephenc committed Jun 12, 2017
1 parent 7fd9e9f commit aaaa28b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/jenkins/plugins/git/GitSCMSource.java
Expand Up @@ -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) {
Expand Down Expand Up @@ -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)) {
Expand Down

0 comments on commit aaaa28b

Please sign in to comment.