Use --no-cone in pipeline sparse checkout script (#3815)

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
This commit is contained in:
Azure SDK Bot 2022-07-11 10:41:11 -07:00 committed by GitHub
parent 46eaa38dde
commit 07a56bc5e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,8 +44,10 @@ steps:
Write-Host "git sparse-checkout init"
git sparse-checkout init
Write-Host "git sparse-checkout set '/*' '!/*/' '/eng'"
git sparse-checkout set '/*' '!/*/' '/eng'
# Set non-cone mode otherwise path filters will not work in git >= 2.37.0
# See https://github.blog/2022-06-27-highlights-from-git-2-37/#tidbits
Write-Host "git sparse-checkout set --no-cone '/*' '!/*/' '/eng'"
git sparse-checkout set --no-cone '/*' '!/*/' '/eng'
}
# Prevent wildcard expansion in Invoke-Expression (e.g. for checkout path '/*')