Repository navigation
feat: support checking out a git commit - #4
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
jvmakine
marked this pull request as ready for review
October 23, 2026 04:01
alecthomas
previously approved these changes
Oct 23, 2026
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
alecthomas
approved these changes
Oct 23, 2026
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.
Git sources can choose a branch or tag with
ref=, but they can't be pinned to an exact commit.ref=goes throughgit clone --branch, which doesn't accept a commit hash.This adds a
commit=<hash>query parameter, passed togit clone --revision:Git fetches only the history leading to the commit and checks it out detached:
depthlimits that history as usual. Withdepth=1, only the one commit is transferred, however old it is.commitcombined withref, and short or unknown hashes ("Remote revision … not found").The clone needs git 2.49 or later. The server must also allow fetching a commit by hash, which every server speaking git protocol v2 (the default since git 2.26) does, including GitHub.
I want this so scaffolder can re-render the exact template revision a directory was scaffolded from.
🤖 Generated with Claude Code