Skip to content

fix: let archived fixtures bypass Git version gates (#1622)#2732

Merged
Sebastian Thiel (Byron) merged 3 commits into
mainfrom
testools-use-archive
Jul 21, 2026
Merged

fix: let archived fixtures bypass Git version gates (#1622)#2732
Sebastian Thiel (Byron) merged 3 commits into
mainfrom
testools-use-archive

Conversation

@Byron

@Byron Sebastian Thiel (Byron) commented Jul 20, 2026

Copy link
Copy Markdown
Member

Tasks

This section is for Byron only. Models continuing this PR must not add, remove, check, uncheck, rename, or reorder checkboxes here.

  • refackiew

Fixes #1622 .


Everything below this line was generated by Codex GPT-5.

Created by Codex on behalf of Byron. Byron will review before this is ready to merge.

Summary

  • add Git-version-aware scripted fixture loaders that require an identity-matching archive when the installed Git is incompatible
  • keep required fixtures in a dedicated cache, honor archives even with GIX_TEST_IGNORE_ARCHIVES, and never generate them with incompatible Git
  • run the affected rev-spec tests against the Git 2.50.1 archive on Git 2.47.x, while skipping only when the matching SHA-1/SHA-256 archive is unavailable
  • migrate Git >= 2.31 worktree tests and restore 32-bit CI to Debian stable

Git 57fb139b5e introduced reversed :/ traversal in 2.47.x; Git 0ff919e87a restored youngest-first ordering in 2.48.0.

Refs #1622

Validation

  • cargo test -p gix-testtools --all-features --lib
  • cargo test -p gix-testtools --no-default-features --lib
  • cargo nextest run -p gix revision::spec::from_bytes --no-default-features --features max-performance-safe,comfort,basic
  • GIX_TEST_FIXTURE_HASH=sha256 cargo nextest run -p gix revision::spec::from_bytes::regex::find_youngest_matching_commit --no-default-features --features max-performance-safe,comfort,basic
  • focused worktree tests
  • cargo clippy -p gix-testtools --all-targets --all-features -- -D warnings
  • cargo clippy -p gix --tests -- -D warnings
  • cargo doc -p gix-testtools --no-deps
  • cargo fmt --all -- --check
  • git diff --check
  • Codex commit review, including a simulated Git 2.47 archive-path test

Comment thread .github/workflows/ci.yml Dismissed
Sebastian Thiel (Byron) and others added 2 commits July 21, 2026 21:10
<!-- agent -->

Add version-aware fixture loaders:

- `scripted_fixture_read_only_with_git_version()`
- `scripted_fixture_read_only_with_args_with_git_version()`

Both use normal fixture generation when the installed Git version satisfies
the caller-provided predicate. For incompatible versions, they require an
identity-matching archive, ignore `GIX_TEST_IGNORE_ARCHIVES`, and return `None`
instead of running the fixture script when no usable archive exists.

Co-authored-by: GPT 5.6 <[email protected]>
@Byron
Sebastian Thiel (Byron) marked this pull request as ready for review July 21, 2026 19:18
<!-- agent -->

Git-dependent fixture tests currently skip outright when the installed Git is
incompatible, even when a checked-in archive contains a known-good fixture that
could run safely. This also keeps 32-bit CI pinned to Debian 12 because Debian
13 ships affected Git 2.47.x.

Use the guarded scripted-fixture loaders for minimum-version worktree tests and
the shared rev-spec fixture, then return 32-bit CI to Debian stable.

Git 57fb139b5e introduced reversed :/<text> traversal in 2.47.x; Git 0ff919e87a
restored youngest-first ordering in 2.48.0.

Co-authored-by: GPT 5.6 <[email protected]>
@Byron
Sebastian Thiel (Byron) merged commit a3e9a77 into main Jul 21, 2026
32 checks passed
@Byron
Sebastian Thiel (Byron) deleted the testools-use-archive branch July 21, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

regex_matches baseline check fails due to rev-parse changes in git 2.47.0

2 participants