Skip to content

Use GIX_TEST_FIXTURE_HASH for gix-status-tests#2574

Merged
Sebastian Thiel (Byron) merged 2 commits intoGitoxideLabs:mainfrom
cruessler:run-gix-status-tests-with-sha-256
May 6, 2026
Merged

Use GIX_TEST_FIXTURE_HASH for gix-status-tests#2574
Sebastian Thiel (Byron) merged 2 commits intoGitoxideLabs:mainfrom
cruessler:run-gix-status-tests-with-sha-256

Conversation

@cruessler
Copy link
Copy Markdown
Contributor

This PR makes gix-status-tests run with GIX_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 of gix_odb::at_opts(…). Apart from that, not a lot of code had to be changed.

This is part of #281.

@cruessler Christoph Rüßler (cruessler) marked this pull request as ready for review May 4, 2026 19:23
Copilot AI review requested due to automatic review settings May 4, 2026 19:23
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-tests under both sha1 and sha256 in justfile.
  • 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.

Comment thread gix-status/tests/fixtures/generated-archives/.gitignore
@Byron Sebastian Thiel (Byron) force-pushed the run-gix-status-tests-with-sha-256 branch from d6e3cd7 to c10c3b8 Compare May 6, 2026 04:24
@Byron
Copy link
Copy Markdown
Member

Thanks a lot, much appreciated!

@Byron Sebastian Thiel (Byron) merged commit ac01cf1 into GitoxideLabs:main May 6, 2026
32 checks passed
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.

3 participants