diff --git a/versioncontrol/git.groovy b/versioncontrol/git.groovy index fc15f81..56d206c 100644 --- a/versioncontrol/git.groovy +++ b/versioncontrol/git.groovy @@ -94,10 +94,11 @@ def gitCheckout(String gitURL, String revision, String targetDir, String repoRoo checkgitlfsinstall() def reporootpath = checkouttoreporoot(gitURL) if (!sparseitemlist.isEmpty()) { - echo "Items in sparse item list: " + def itemstring = "Items in sparse item list:\n" for (item in sparseitemlist) { - echo item + itemstring += item + "\n" } + echo itemstring } checkout([ $class: 'GitSCM', @@ -114,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], - sparsecheckoutconfig(sparseitemlist) + [$class: 'SparseCheckoutPaths', sparseCheckoutPaths: sparsecheckoutconfig(sparseitemlist)], ], submoduleCfg: [], ])