Use GIX_TEST_FIXTURE_HASH for gix-status-tests#2574
Merged
Sebastian Thiel (Byron) merged 2 commits intoGitoxideLabs:mainfrom May 6, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR extends gix-status-tests so they can run against SHA-256 fixtures via GIX_TEST_FIXTURE_HASH, aligning the status test suite with the repository’s broader SHA-256 transition work from issue #281.
Changes:
- Run
gix-status-testsunder bothsha1andsha256injustfile. - Make status tests read indexes and object databases using the fixture hash selected from the environment.
- Add SHA-1→SHA-256 object-id mapping for expected conflict IDs and allow the test crate to compile with both hash features.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
justfile |
Adds dedicated sha1 and sha256 runs for gix-status-tests. |
gix-status/tests/status/mod.rs |
Adds hash-aware object-id conversion for expected test values. |
gix-status/tests/status/index_as_worktree.rs |
Switches index/ODB setup to the selected fixture hash. |
gix-status/tests/status/index_as_worktree_with_renames.rs |
Makes rename/status tests hash-aware and adjusts one hash-dependent assertion. |
gix-status/tests/fixtures/generated-archives/.gitignore |
Adds ignore entries for some SHA-256-generated fixture archives. |
gix-status/tests/Cargo.toml |
Enables both sha1 and sha256 features on gix-hash for the test crate. |
d6e3cd7 to
c10c3b8
Compare
Member
|
Thanks a lot, much appreciated! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR makes
gix-status-testsrun withGIX_TEST_FIXTURE_HASH=sha256. For mapping SHA-1 to SHA-256 hashes, it uses the same pattern as #2573. Also, there’s some similar duplication surrounding the uses ofgix_odb::at_opts(…). Apart from that, not a lot of code had to be changed.This is part of #281.