mirror of https://github.com/actions/checkout.git
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
|
||
|---|---|---|
| .. | ||
| misc | ||
| fs-helper.ts | ||
| git-auth-helper.ts | ||
| git-command-manager.ts | ||
| git-directory-helper.ts | ||
| git-source-provider.ts | ||
| git-source-settings.ts | ||
| git-version.ts | ||
| github-api-helper.ts | ||
| input-helper.ts | ||
| main.ts | ||
| ref-helper.ts | ||
| regexp-helper.ts | ||
| retry-helper.ts | ||
| state-helper.ts | ||
| unsafe-pr-checkout-helper.ts | ||
| url-helper.ts | ||
| workflow-context-helper.ts | ||