13
0
Fork 0
mirror of https://github.com/dorny/paths-filter.git synced 2026-06-28 20:30:43 +00:00

Enhance base comparison with SHA resolution

This commit is contained in:
Zydney Ambat 2026-06-25 07:47:14 +10:00 committed by GitHub
parent 62f774ae39
commit cbd5f6aab9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -153,7 +153,9 @@ async function getChangedFilesFromGit(base: string, head: string, initialFetchDe
}
const isBaseSha = git.isGitSha(base)
const isBaseSameAsHead = base === head
const baseSha = await git.resolveRefToSha(base)
const headSha = await git.resolveRefToSha(head)
const isBaseSameAsHead = base === head || baseSha === headSha
// If base is commit SHA we will do comparison against the referenced commit
// Or if base references same branch it was pushed to, we will do comparison against the previously pushed commit