mirror of
https://github.com/actions/checkout.git
synced 2026-09-26 20:10:04 +08:00
GitVersion.checkMinimum guarded the patch comparison with a truthiness check
on `this.patch`, so a version whose patch component was explicitly zero was
treated as if the patch were unspecified and the comparison was skipped
entirely. That made `new GitVersion('4.5.0').checkMinimum(new GitVersion('4.5.1'))`
return true.
Compare the patch only when it was actually specified, distinguishing an
explicit zero from an unspecified one. A two-part version such as "2.28" still
leaves patch as NaN and continues to satisfy any patch of that minor version,
which is the behavior the existing tests rely on.
* compare an explicit patch of zero against the minimum version
* add regression coverage for an explicit patch of zero
* rebuild dist
|
||
|---|---|---|
| .. | ||
| git-auth-helper.test.ts | ||
| git-command-manager.test.ts | ||
| git-directory-helper.test.ts | ||
| git-version.test.ts | ||
| github-api-helper.test.ts | ||
| input-helper.test.ts | ||
| modify-work-tree.sh | ||
| override-git-version.cmd | ||
| override-git-version.sh | ||
| ref-helper.test.ts | ||
| retry-helper.test.ts | ||
| unsafe-pr-checkout-helper.test.ts | ||
| url-helper.test.ts | ||
| verify-basic.sh | ||
| verify-clean.sh | ||
| verify-fetch-filter.sh | ||
| verify-fetch-tags.sh | ||
| verify-lfs.sh | ||
| verify-no-unstaged-changes.sh | ||
| verify-side-by-side.sh | ||
| verify-sparse-checkout-non-cone-mode.sh | ||
| verify-sparse-checkout.sh | ||
| verify-submodules-false.sh | ||
| verify-submodules-recursive.sh | ||
| verify-submodules-true.sh | ||
| verify-worktree.sh | ||