feat(lfs): add git LFS read-only support (pointer resolution + batch download)#34
Merged
feat(lfs): add git LFS read-only support (pointer resolution + batch download)#34
Conversation
Implements `is_lfs_pointer`, `parse_lfs_pointer`, and `lfs_object_path` in `src/lib/lfs.mbt` with 8 passing unit tests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Validate that the OID contains only valid hex characters (in addition to length == 64) in parse_lfs_pointer. Add two wbtest cases: wrong version and non-hex OID. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements lfs_prefetch_for_checkout in src/lib/native/lfs_prefetch.mbt: walks a commit tree, identifies uncached LFS pointer blobs via gitattributes filter=lfs, resolves the LFS URL, runs a batch download request, and downloads missing objects to .git/lfs/objects/. Also adds @stdio import to native lib moon.pkg for stderr warning output. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…FS block Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Insert best-effort LFS prefetch calls in checkout_with_promisor_retry and checkout_with_promisor_retry_clone before the retry loop, and make resolve_checkout_common_git_dir public in src/lib/checkout.mbt. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
version https://git-lfs.github.com/spec/v1blobslfs.url,remote.<name>.lfsurl, or derived from remote URL/objects/batchfor download URLs, parse responses.git/lfs/objects/cachefilter=lfsstartup block — LFS repos no longer rejectedNo
git-lfsbinary dependency. bit handles LFS natively.Scope: Read-only (clone/checkout). Write operations (push/clean) are out of scope.
Test plan
src/lib/lfs_wbtest.mbt)src/lib/native/lfs_client_wbtest.mbt)moon check --deny-warnpasses for native and JS targets🤖 Generated with Claude Code