Skip to content

Commit 7b20616

Browse files
azure-sdkbenbp
andauthored
Use --no-cone in pipeline sparse checkout script (Azure#25165)
Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
1 parent 946d787 commit 7b20616

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

eng/common/pipelines/templates/steps/sparse-checkout.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ steps:
4444
Write-Host "git sparse-checkout init"
4545
git sparse-checkout init
4646
47-
Write-Host "git sparse-checkout set '/*' '!/*/' '/eng'"
48-
git sparse-checkout set '/*' '!/*/' '/eng'
47+
# Set non-cone mode otherwise path filters will not work in git >= 2.37.0
48+
# See https://github.blog/2022-06-27-highlights-from-git-2-37/#tidbits
49+
Write-Host "git sparse-checkout set --no-cone '/*' '!/*/' '/eng'"
50+
git sparse-checkout set --no-cone '/*' '!/*/' '/eng'
4951
}
5052
5153
# Prevent wildcard expansion in Invoke-Expression (e.g. for checkout path '/*')

0 commit comments

Comments
 (0)