Skip to content

dev/aratiu/sha256 pack#2657

Merged
Sebastian Thiel (Byron) merged 3 commits into
mainfrom
dev/aratiu/sha256-pack
Jun 20, 2026
Merged

dev/aratiu/sha256 pack#2657
Sebastian Thiel (Byron) merged 3 commits into
mainfrom
dev/aratiu/sha256-pack

Conversation

@Byron

Copy link
Copy Markdown
Member

This PR is #2655 with a review commit added on top.
No rewrites.

Adrian Ratiu (10ne1) and others added 3 commits June 19, 2026 17:07
The checksum-verification child progress was always labelled "Sha1 of
index", even when verifying a SHA-256 index. The checksum itself already
uses the index's own object hash; only the label was misleading.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Signed-off-by: Adrian Ratiu <[email protected]>
The existing multi-index write test feeds the static SHA-1 packs and checks
pinned SHA-1 values, so writing a multi-index was never exercised with
SHA-256 object ids.

Add a companion test that builds a multi-index from the hash-parameterized
fixture (via GIX_TEST_FIXTURE_HASH), so the writer now runs under both hashes.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Signed-off-by: Adrian Ratiu <[email protected]>
- refactored both tests for readability, given most of them was duplicated.

Co-authored-by: Sebastian Thiel <[email protected]>
Copilot AI review requested due to automatic review settings June 20, 2026 06:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Extends gix-pack multi-index writer test coverage to run against the hash-parameterized fixture (so it gets exercised under both SHA-1 and SHA-256), and updates an index verification progress label to no longer hardcode SHA-1.

Changes:

  • Refactors the existing multi-index write test into shared helpers and adds a new test that uses the hash-parameterized pack fixture (dual-hash coverage).
  • Copies referenced pack/index files into a temp dir for full integrity verification of the written multi-index.
  • Renames a progress label in index verification from SHA-1-specific wording to generic wording.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
gix-pack/tests/pack/multi_index/write.rs Refactors and extends tests to write/verify multi-indexes under both SHA-1 and SHA-256 fixtures.
gix-pack/src/index/verify.rs Makes the checksum progress label hash-agnostic.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread gix-pack/tests/pack/multi_index/write.rs
@Byron
Sebastian Thiel (Byron) merged commit cdafa6a into main Jun 20, 2026
33 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.

4 participants