Skip to content

fix: handle git-lfs pointer files#438

Merged
YogliB merged 1 commit into
masterfrom
feature/lfs-pointer-fallback
Jun 4, 2026
Merged

fix: handle git-lfs pointer files#438
YogliB merged 1 commit into
masterfrom
feature/lfs-pointer-fallback

Conversation

@YogliB
Copy link
Copy Markdown
Collaborator

@YogliB YogliB commented Jun 4, 2026

Summary

What

Handle git-lfs pointer files in tarball clones by extracting to a temp directory, detecting exact pointer files, and falling back to git clone when needed.

Why

Some repositories serve tarballs that contain Git LFS pointer files instead of real blob contents, so tarball-first cloning needs a fallback path for those repos.

resolved: #381

Changes

  • Extract tarballs into a temporary directory before copying files into the destination.
  • Detect exact Git LFS pointer files, including the canonical and legacy Hawser pointer versions.
  • Fall back to git clone only when a real pointer file is present.
  • Keep the downloaded tarball cached and keep the warning when fallback happens.
  • Add regression tests for quoted pointer text, canonical pointers, and legacy pointers.

Testing

How you verified this (commands, scenarios, or N/A):

  • Automated tests (bun run test)
  • Manual / CLI check if user-facing behavior changed
  • CI passes

Review notes

Breaking changes (or none)

None.

Risks / rollout (or none)

The tarball path now scans extracted files before copying them into place.

Focus areas for reviewers (optional)

Tar extraction flow, pointer detection, and the regression coverage for pointer detection and fallback.

Checklist

  • Error paths and exit codes considered where relevant
  • Help text, completions, or docs updated if user-facing strings changed
  • Squashed to a single commit
  • No unrelated drive-by changes

@YogliB YogliB force-pushed the feature/lfs-pointer-fallback branch 2 times, most recently from 04f0435 to 9ec96fd Compare June 4, 2026 17:50
@YogliB YogliB force-pushed the feature/lfs-pointer-fallback branch from 58576c8 to 5819d57 Compare June 4, 2026 19:35
@YogliB YogliB merged commit 90eb048 into master Jun 4, 2026
11 checks passed
@YogliB YogliB deleted the feature/lfs-pointer-fallback branch June 4, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support clone the git lfs object

1 participant