Conversation
This branch has not been deployed
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.
Fixes #7306.
Without
-w,hash-objectdoes not open a repository. Passing the resultingzero object-ID type to content validation rejects valid commit and tag objects.
Use
GIT_OID_DEFAULTwhen no repository is open, matching the default alreadyused to compute their IDs. Repository-specific types remain unchanged with
-w.Add a CLI CTest regression covering known blob/tree/commit/tag hashes through
both files and stdin, plus rejection of malformed non-blob contents. The valid
commit test fails on current main and passes with the fix. Unlike the original
report, current main reports a bad commit object instead of an unknown OID type;
the missing default is still reproducible.
Validation on Linux: offline, utility and new CLI CTest suites all pass.
Writing valid commit/tag objects with
-win both SHA1 and SHA256 repositoriesalso produces the same IDs as Git, with the resulting objects readable by Git.
The test registration uses target availability (including the iOS CLI exclusion)
and fixtures are normalized to LF for consistent hashes. Non-Linux execution
remains for upstream CI.
AI assistance was used to investigate, implement, and run local validation.