Repository navigation
feat: accept historical Git LFS pointer variants - #37
Merged
Merged
Conversation
Extend the LFS pointer classifier to mirror git-lfs 3.8.1's decoder: the three historical version aliases (git-lfs, hawser, git-media), CRLF line endings, surrounding whitespace, blank lines and ext-* extensions are now recognized for pointers smaller than 1024 bytes. Pointers 1024 bytes or larger (padded) and a zero or malformed size still stop the run, because the git-lfs scanner cannot transfer them. Refs #5
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.
What
Extends the Git LFS pointer classifier to accept the historical pointer variants that git-lfs 3.8.1 itself decodes, for pointers smaller than 1024 bytes: the three version aliases (
git-lfs,hawser,git-media), CRLF line endings, surrounding whitespace, blank lines, andext-*extensions.Pointers 1024 bytes or larger (padded) and a zero or malformed size still stop the run, because the git-lfs scanner cannot transfer those objects.
Refs #5
Why
The transfer path (
git lfs fetch/push --all) already copies these variants, but the classifier was rejecting them as unsupported. This removes false blocks without adding a new transfer route.How tested
gofmt -l .andgo vet ./...clean.go test -race -count=1 ./...— 156 passed.go test -race -tags=lfsintegration -count=1 ./...— 162 passed (git-lfs 3.8.1).TestLFSClassifyBlobAgainstGitLFS): 27/27 — everything we accept, git-lfs accepts; nothing git-lfs accepts is classified as "no LFS".git diff --checkclean.Remaining work
size 0pointers still stop the run (tracked in Replicate Git LFS objects before updating destination refs #5); they need a dedicated transfer route the current git-lfs CLI cannot do.