Skip to content

feat: accept historical Git LFS pointer variants - #37

Merged
vmvarela merged 2 commits into
masterfrom
feat/lfs-pointer-variants
Oct 31, 2026
Merged

vmvarela merged 2 commits into
masterfrom
feat/lfs-pointer-variants

Conversation

@vmvarela

Copy link
Copy Markdown
Owner

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, and ext-* 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 . and go vet ./... clean.
  • go test -race -count=1 ./... — 156 passed.
  • go test -race -tags=lfsintegration -count=1 ./... — 162 passed (git-lfs 3.8.1).
  • Differential check against real 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 --check clean.

Remaining work

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
@vmvarela
vmvarela merged commit 4d2ad88 into master Oct 31, 2026
19 checks passed
@vmvarela vmvarela added the enhancement New feature or request label Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant