Skip to content

feat: transfer padded Git LFS pointers and skip size-0 - #38

Merged
vmvarela merged 1 commit into
masterfrom
feat/lfs-oversized-pointers
Oct 31, 2026
Merged

vmvarela merged 1 commit into
masterfrom
feat/lfs-oversized-pointers

Conversation

@vmvarela

Copy link
Copy Markdown
Owner

What

Completes Git LFS pointer support (closes #5):

  • Oversized (≥1024-byte) spec-v1 pointers are now decoded from their first 1024 bytes and transferred. The git-lfs CLI scanner rejects blobs at or above 1024 bytes, so these go through a materialized canonical pointer and git lfs fetch/push --object-id instead.
  • size 0 pointers are treated as empty objects: git-lfs stores nothing for them, so the pointer blob is copied as an ordinary file with no LFS transfer.

Why

The classifier already mirrored git-lfs 3.8.1's decoder for the common cases. These two edge cases — padded pointers and textual size-0 pointers — were the last ones the run still blocked, leaving #5 open.

How tested

  • gofmt -l . and go vet ./... clean; GOOS=windows go vet ./... clean.
  • go test -race -count=1 ./... — 156 passed.
  • go test -race -tags=lfsintegration -count=1 ./... — 163 passed (git-lfs 3.8.1), including the new TestLFSIntegrationOversizedPointer end-to-end case.
  • Differential check against real git-lfs 3.8.1 (TestLFSClassifyBlobAgainstGitLFS): 26/26.
  • Cross-builds windows/amd64, windows/arm64, plan9/amd64 OK.
  • git diff --check clean.

Closes #5

Oversized (>=1024-byte) spec-v1 pointers are now decoded from their first
1024 bytes and transferred through a materialized canonical pointer plus
git lfs fetch/push --object-id, because the git-lfs scanner rejects blobs
at or above 1024 bytes. A size-0 pointer is treated as an empty object
(git-lfs stores nothing) and copied as an ordinary blob.

Closes #5
@vmvarela
vmvarela merged commit 4ddf7ad into master Oct 31, 2026
17 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.

Replicate Git LFS objects before updating destination refs

1 participant