From ddc231ccacd21a672eaf1be65fa30640ba692178 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Mon, 13 May 2019 22:54:47 +0100 Subject: [PATCH] Print out items in sparse item list if the list is not empty --- versioncontrol/git.groovy | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/versioncontrol/git.groovy b/versioncontrol/git.groovy index 5a92884..b37bbc7 100644 --- a/versioncontrol/git.groovy +++ b/versioncontrol/git.groovy @@ -11,12 +11,12 @@ String getGitInfo(String workingSetRootPath) { } @NonCPS -def SparseCheckoutPaths sparsecheckoutconfig(ArrayList paths) { +def ArrayList sparsecheckoutconfig(ArrayList paths) { ArrayList sparsecheckoutpaths = new ArrayList() for (path in paths) { sparsecheckoutpaths.add(new SparseCheckoutPath(path)) } - return new SparseCheckoutPaths(sparsecheckoutpaths) + return sparsecheckoutpaths } def String uniquereporootname(String gitURL) { @@ -115,7 +115,7 @@ def gitCheckout(String gitURL, String revision, String targetDir, String repoRoo [$class: 'CloneOption', depth: cloneDepth, noTags: false, reference: reporootpath, shallow: shallowClone, timeout: 120], [$class: 'CheckoutOption', timeout: 120], [$class: 'RelativeTargetDirectory', relativeTargetDir: targetDir], - [$class: 'SparseCheckoutPaths', sparsecheckoutconfig(sparseitemlist)], + [$class: 'SparseCheckoutPaths', sparseCheckoutPaths: sparsecheckoutconfig(sparseitemlist)], ], submoduleCfg: [], ])