Support SHA-256 git hashes in reference checks - #253
Open
James Frost (jfrost-mo) wants to merge 1 commit into
Open
Support SHA-256 git hashes in reference checks#253James Frost (jfrost-mo) wants to merge 1 commit into
James Frost (jfrost-mo) wants to merge 1 commit into
Conversation
James Frost (jfrost-mo)
marked this pull request as ready for review
September 4, 2026 15:55
Git 3.0 will be defaulting to SHA-256, so will have longer (64 character) object IDs. This is a non-exhaustive fix, as I have not checked everywhere in the codebase, but just grepped for some common regex patterns that would be problematic. I have checked that you can checkout a SHA-256 format repository though.
James Frost (jfrost-mo)
force-pushed
the
sha256support
branch
from
September 4, 2026 15:58
20f53e4 to
9818e62
Compare
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.
PR Summary
Git 3.0 will be defaulting to SHA-256, so will have longer (64 character) object IDs.
This PR has not exhaustively reviewed support for SHA-256, only fixed an issue I spotted when making another change, and a couple others I found by grepping for the
{40}regex pattern.Sci/Tech Reviewer:
Code Reviewer:
Code Quality Checklist
Testing
I have successfully cloned a SHA-256 repository (hosted on a local webserver) with this script. Both hashes and branches as refs worked, though hashes required hacking
clone_repoas directly fetching a commit is not supported by the dumb HTTP transport. This would not be an issue on a proper git host.I have also verified that existing checks for SHA-1 hashes remain working.
Security Considerations
AI Assistance and Attribution
Sci/Tech Review
(Please alert the code reviewer via a tag when you have approved the SR)
Code Review