Skip to content

feat(git): allow repositories to opt out of LFS snapshots - #48

Merged
ravi-pplx merged 3 commits into
pplx/mainfrom
feat/per-repo-lfs-snapshot-opt-out
Nov 21, 2026
Merged

ravi-pplx merged 3 commits into
pplx/mainfrom
feat/per-repo-lfs-snapshot-opt-out

Conversation

@ravi-pplx

@ravi-pplx ravi-pplx commented Nov 21, 2026 •

Copy link
Copy Markdown

Repositories can use Git LFS without consuming Cachew's separate LFS archive. Building that archive still fetches LFS objects and occupies the repository's snapshot queue.

Configure the checkout filter and the LFS archive independently in one repository block:

strategy git {
  snapshot-interval = "1h"
  repository "github.com/org/repo" {
    snapshot-filter      = "blob:none"
    disable-lfs-snapshot = true
  }
}

With disable-lfs-snapshot = true, Cachew skips that repository's periodic LFS archive job. Once Git warm-up is complete, GET and HEAD return 404 for the archive, even if cached, without starting a mirror warm-up. The GET body reads LFS snapshot disabled for this repository, which confirms the setting was applied: strategy blocks ignore unknown keys, so a misspelled option leaves the archive enabled. Existing objects expire under normal retention. The opt-out does not change ordinary Git LFS traffic, checkout snapshots, mirror backups, or other repositories.

Existing snapshot-filters configurations need no migration. A repository can continue using its legacy filter while opting out of the LFS archive in the new block. Duplicate blocks and competing filter definitions are rejected. Startup readiness remains a strategy-wide setting.

Upgrade the binary before moving a filter into a repository block. The base binary starts with the new block but ignores it: it still warms the mirror on an LFS archive miss, and a filter specified only inside the block is not applied. A rollback should restore the previous config with the previous binary.

Created with Perplexity

Co-authored-by: Perplexity <noreply@perplexity.ai>
@ravi-pplx
ravi-pplx marked this pull request as ready for review November 21, 2026 14:52
@ravi-pplx ravi-pplx changed the title Allow repositories to opt out of LFS snapshots feat(git): allow repositories to opt out of LFS snapshots Nov 21, 2026
ravi-pplx and others added 2 commits November 21, 2026 15:00
Co-authored-by: Perplexity <noreply@perplexity.ai>
Co-authored-by: Perplexity <noreply@perplexity.ai>
@ravi-pplx
ravi-pplx merged commit 4e93b9c into pplx/main Nov 21, 2026
5 checks passed
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.

1 participant