-
Notifications
You must be signed in to change notification settings - Fork 399
[JENKINS-70303] Remove leading and trailing spaces from refspec #1096
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 2 commits
62b403a
cb65539
2b04ed4
bce6f58
31ecb75
01afbe3
4dabf5e
03f01ff
b9f95b0
3fb3ae2
9847dfe
08cb1eb
69e5269
ef865e4
76b416c
021801a
034c027
88420e2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,16 @@ | |
import hudson.plugins.git.Revision; | ||
import hudson.util.ArgumentListBuilder; | ||
import hudson.util.Secret; | ||
import java.io.*; | ||
import java.io.BufferedReader; | ||
MarkEWaite marked this conversation as resolved.
Show resolved
Hide resolved
|
||
import java.io.BufferedWriter; | ||
import java.io.ByteArrayOutputStream; | ||
import java.io.File; | ||
import java.io.IOException; | ||
import java.io.OutputStreamWriter; | ||
import java.io.PrintWriter; | ||
import java.io.StringReader; | ||
import java.io.StringWriter; | ||
import java.io.Writer; | ||
import java.net.URI; | ||
import java.net.URISyntaxException; | ||
import java.nio.charset.Charset; | ||
|
@@ -612,7 +621,7 @@ public void execute() throws GitException, InterruptedException { | |
if (refspecs != null) { | ||
for (RefSpec rs : refspecs) { | ||
if (rs != null) { | ||
args.add(rs.toString()); | ||
args.add(rs.toString().trim()); | ||
} | ||
} | ||
} | ||
|
@@ -667,7 +676,7 @@ public void fetch(String remoteName, RefSpec... refspec) throws GitException, In | |
if (refspec != null && refspec.length > 0) { | ||
for (RefSpec rs : refspec) { | ||
if (rs != null) { | ||
args.add(rs.toString()); | ||
args.add(rs.toString().trim()); | ||
} | ||
} | ||
} | ||
|
@@ -861,7 +870,8 @@ public void execute() throws GitException, InterruptedException { | |
} | ||
|
||
if (refspecs == null) { | ||
refspecs = Collections.singletonList(new RefSpec("+refs/heads/*:refs/remotes/" + origin + "/*")); | ||
refspecs = Collections.singletonList( | ||
new RefSpec("+refs/heads/*:refs/remotes/" + origin + "/*".trim())); | ||
|
||
} | ||
fetch_().from(urIish, refspecs) | ||
.shallow(shallow) | ||
|
Uh oh!
There was an error while loading. Please reload this page.