Skip to content

Commit

Permalink
Add root directory to list of sparse checkout paths (Azure#19732)
Browse files Browse the repository at this point in the history
Explicitly add '/*' '!/*/' to the list of paths so we include
the files in the root of the repo.

Added some extra command logging so we can easily repro locally without
needing to find the code that ran.

Update to '/eng' so that we only get paths that start with eng instead
of every path that has eng as a folder.

Co-authored-by: Wes Haggard <Wes.Haggard@microsoft.com>
  • Loading branch information
2 people authored and rakshith91 committed Jul 16, 2021
1 parent 845909d commit c36340f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion eng/common/pipelines/templates/steps/sparse-checkout.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,15 @@ steps:
Write-Host "Repository $($repository.Name) has already been initialized. Skipping this step."
} else {
Write-Host "Repository $($repository.Name) is being initialized."
Write-Host "git clone --no-checkout --filter=tree:0 git://github.com/$($repository.Name) ."
git clone --no-checkout --filter=tree:0 git://github.com/$($repository.Name) .
Write-Host "git sparse-checkout init"
git sparse-checkout init
git sparse-checkout set eng
Write-Host "git sparse-checkout set '/*' '!/*/' '/eng'"
git sparse-checkout set '/*' '!/*/' '/eng'
}
$gitsparsecmd = "git sparse-checkout add $paths"
Expand Down

0 comments on commit c36340f

Please sign in to comment.