Skip to content

Commit b920000

Browse files
authored
Merge pull request #290 from CommunityToolkit/incremental-builds/changed-components/handle-force-pushes
Handle force pushes for incremental builds
2 parents f31a5e4 + 2fac84d commit b920000

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Get-Changed-Components.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ if (-not $ToSha) {
3030
$ToSha = $(git rev-parse HEAD)
3131
}
3232

33+
# Ensure that orphaned commits are available for diffing (e.g. when force-pushed).
34+
git fetch origin $FromSha
3335
git fetch origin main
3436

3537
$changedComponentFiles = Invoke-Expression "git diff --name-only $($FromSha)...$($ToSha) -- components/" -ErrorAction Stop

0 commit comments

Comments
 (0)