Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[JENKINS-43507] Fix invalid implicit assumption that remote name is a…
- Loading branch information
Showing
with
2 additions
and
2 deletions.
-
+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)) { |
|
|