| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| gix-testtools v0.22.0 source code.tar.gz | 2026-10-24 | 19.4 MB | |
| gix-testtools v0.22.0 source code.zip | 2026-10-24 | 21.0 MB | |
| README.md | 2026-10-24 | 15.9 kB | |
| Totals: 3 Items | 40.4 MB | 0 | |
Chore
- make docs-rs work, and publishing
New Features
- add
rename()for replacing read-only fixture files I removed a lot of tests for that, assuming it's trivial enough to get right and existing tests that use it are proof of function enough.
Git creates read-only commit-graph files. On Windows, this also prevents
replacing them with std::fs::rename(), requiring fixture setup to clear
the destination's read-only attribute first.
Add gix_testtools::rename() to retry permission-denied renames after
clearing that attribute. Other platforms retain std::fs::rename()
behavior. Document that callers must use writable fixtures or fixture
initialization and release memory mappings before replacing backing files.
- Trace Bash fixture commands without changing captured baselines
A flaky Windows fetch test failed while generating make_remote_repos.sh,
before the worktree assertions ran. The fixture output stopped after cloning
credential-helpers, leaving no failing command or process exit status to
explain the abort. Expected merge conflicts earlier in the script further
obscured where setup actually failed.
Enable set -x by default for .sh fixtures on Bash 4.1 and newer. Route
traces through BASH_XTRACEFD to a duplicate of the original stderr, so
commands that redirect stderr into fixture baselines do not capture tracing
output. Keep successful fixture generation quiet by retaining the runner's
existing policy of printing captured output only on failure.
Bash 3.2, including the version shipped with macOS, cannot redirect xtrace
independently of stderr. Use an inherited ERR trap there to report the
failed command, script location, and status through the same descriptor.
Include the subprocess exit status in the runner's error on every platform.
Add coverage for silent command lookup failures, unchanged redirected stderr baselines, and exit statuses in fixture errors. This improves diagnosis; it does not identify or fix the original Windows flake.
- add symlink preflight for Bash fixtures
Careful refackiew, only the tests were mostly waved through as they are known to be super thorough. Only their style needs checking, which was fine here.
Fixtures that require symbolic links need to distinguish unavailable symlink creation on the host from broken fixture setup. Otherwise, tests either fail on unsupported filesystems or risk hiding unrelated errors when skipping.
Inject gix_testtools_require_symlinks into Bash fixtures to probe creation
of a real link before generating contents. Record the outcome at the fixture
root and stop successfully when links are unavailable. Tests can then use
fixture_has_symlinks() to skip explicitly; missing or malformed results,
unexpected ln exits, copied files, and later setup failures remain errors.
Preserve script arguments and Bash 3.2 source context without exporting the helper to child shells. Include the prelude in cache keys for fixtures using the probe, and document archive and writable-fixture constraints.
- redact unstable values in diagnostic snapshots
Complete error snapshots expose useful context and causes, but temporary paths, dynamically assigned ports, object IDs, and platform-specific I/O messages make their output unstable.
Add redact_debug_snapshot() to apply explicit replacements, reuse object-ID
normalization, and render OS errors by their portable ErrorKind. Handle
plain and debug-escaped Windows paths while retaining meaningful suffixes
and unrelated backslashes. Return an owned Debug value so insta displays
the diagnostic without additional quoting or newline escaping.
Cover redaction, object identity, and OS error formatting, and convert the environment, SBOM argument, and Rust fixture error assertions to complete inline snapshots. The helper is available before downstream diagnostic snapshot migrations need it.
Bug Fixes
- Make checkout safety fixtures reliable on Windows
The traversal fixture rewrites .git/index to install paths Git would not
normally accept. MSYS sed reads that binary index in text mode, removing
carriage returns from incidental CRLF bytes in its stat data. Variable
timestamps make the resulting corruption intermittent. Setting the mtime to
2000-11-01T12:31:06Z (0x3a000d0a) reproduced the reported
U git/hooks/pre-commit and unresolved-conflict error exactly.
Use Perl with binary standard streams and literal path substitution, which
also works on systems without sed -b. Keep the CRLF-containing timestamp
in every generated repository so text-mode index corruption is exercised
deterministically by the existing checkout safety tests.
The same log's long-path warnings come from a relative XDG_CONFIG_HOME
being reinterpreted after the fixture changes directories. Make the isolated
configuration path absolute, and exercise both absolute and relative fixture
roots by checking that Git still reads the intended attributes after cd.
Validated on Windows with Git 2.55.0.windows.3:
- Keep rust workspace tests inside disposable repositories and isolated environments
Direct Git launches inherited repository selectors and user configuration even when tests supplied a fixture working directory. Tests of default-environment APIs and local Git transports also shared the runner's environment. A few journey tests wrote beneath source directories or used the source checkout as the repository under test.
Use the shared gix-testtools Git command builder for subprocess setup, isolated
repository options for fixtures, and isolated child processes where the real
environment-reading API must be exercised. Scope CWD changes, copy the fixture
used by an object-write test, and run shell journeys through jtt run. Keep
journey worktrees and example output within their disposable sandboxes and
replace the attributes checkout test with a representative fixture repository.
Prompt examples also run in isolated children and must build successfully; the
old tests could ignore build failures and execute stale cached binaries.
The affected Rust crate suites, internal test-tool build, and max-pure journey
suite pass from a source copy without Git metadata. Signing and Git-daemon
checks use only disposable keys, repositories, and local sockets.
- isolate fixtures from inherited Git templates
Fixture commands already ignore external Git configuration, but inherited
GIT_TEMPLATE_DIR could still inject personal template files into repositories
created by git init, making fixtures depend on the caller's environment.
Clear that variable in the shared command setup used by fixture scripts and isolated Git helpers. Keep Git's installed templates available because existing fixtures rely on their standard files and directory layout.
Document the isolation behavior and add a regression that supplies an external
template containing a marker file, then verifies that git init does not copy
it into the fixture repository.
-
keep fixture scripts isolated when they set GIT_CONFIG_COUNT themselves The isolation configuration (no signing, no auto-maintenance,
init.defaultBranch=main) reached scripts only asGIT_CONFIG_COUNTvariables, so a script exporting its ownGIT_CONFIG_COUNTreplaced all of it. With maintenance back on, each commit in such a script spawned a detachedgit maintenance run --autothat could outlive the script and mutate the fixture while it was being copied, failing tests with a bare ENOENT. -
the isolation now lives in a global configuration file under
tests/fixtures/generated-do-not-edit/, written once per process; a script's ownGIT_CONFIG_COUNTlayers on top of it - ambient
GIT_CONFIG_COUNTis removed from the script environment, as it used to be overwritten - a script or
git()call that writes global configuration fails with a clear message and the file is restored, so the mistake stays contained to the offender
Changed (BREAKING)
- raise MSRV to Rust 1.88
The newly published dua-core 3.3 release used by linked-worktree removal
requires Rust 1.88, so raise every workspace crate and the advertised badge
together.
Keep the MSRV checks buildable by selecting the latest sysinfo and rusqlite
release lines that support Rust 1.88.
Commit Statistics
- 42 commits contributed to the release over the course of 62 calendar days.
- 62 days passed between releases.
- 10 commits were understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
Commit Details
<csr-read-only-do-not-edit>