Disable detached head warnings on sparse checkout to commit (#3680)
Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
This commit is contained in:
parent
6b903d0b3f
commit
3aa878eb3c
@ -59,8 +59,9 @@ steps:
|
||||
|
||||
# sparse-checkout commands after initial checkout will auto-checkout again
|
||||
if (!$hasInitialized) {
|
||||
Write-Host "git checkout $($repository.Commitish)"
|
||||
git checkout $($repository.Commitish) # this will use the default branch if repo.Commitish is empty
|
||||
Write-Host "git -c advice.detachedHead=false checkout $($repository.Commitish)"
|
||||
# This will use the default branch if repo.Commitish is empty
|
||||
git -c advice.detachedHead=false checkout $($repository.Commitish)
|
||||
} else {
|
||||
Write-Host "Skipping checkout as repo has already been initialized"
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user