Fix unmaterialized LFS files on persistent/self-hosted runners - #2552
Open
KlotzAndrew wants to merge 1 commit into
Open
Fix unmaterialized LFS files on persistent/self-hosted runners#2552KlotzAndrew wants to merge 1 commit into
KlotzAndrew wants to merge 1 commit into
Conversation
Problem On persistent/self-hosted runners that reuse a working directory across jobs, LFS-tracked files can be left as pointer files instead of real content when a lfs: false checkout precedes a lfs: true checkout of the same repo. Sequence that triggers it: 1. A lfs: false run sets GIT_LFS_SKIP_SMUDGE=1, so git checkout writes LFS files to the working tree as pointers. 2. A later lfs: true run on the same worktree fetches the objects into .git/lfs, but git checkout sees the tree already at the target commit and does not re-smudge the already-present pointer files. Result: the objects are in the local cache, but the working tree still contains pointers. The action relies on the smudge filter firing during git checkout to materialize content — which holds on a clean tree (GitHub-hosted runners) but not on a reused one. Related: actions#270
KlotzAndrew
force-pushed
the
fix/lfs-checkout-persistent-runners
branch
from
August 6, 2026 23:45
604bd60 to
5799203
Compare
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.
Problem
On persistent/self-hosted runners that reuse a working directory across jobs, LFS-tracked files can be left as pointer files instead of real content when a lfs: false checkout precedes a lfs: true checkout of the same repo.
Sequence that triggers it:
Result: the objects are in the local cache, but the working tree still contains pointers. The action relies on the smudge filter firing during git checkout to materialize content - which holds on a clean tree (GitHub-hosted runners) but not on a reused one.
Related: #270