Skip to content

fix(git): disable filter.lfs.required when git-lfs binary is missing - #823

Merged
skevetter merged 1 commit into
mainfrom
fix/lfs-filter-required-false
Jul 30, 2026
Merged

fix(git): disable filter.lfs.required when git-lfs binary is missing#823
skevetter merged 1 commit into
mainfrom
fix/lfs-filter-required-false

Conversation

@skevetter

@skevetter skevetter commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • fix(git): disable LFS filter driver during clone when git-lfs binary is missing #813 disables the LFS process/smudge/clean filters when git-lfs isn't installed, but leaves filter.lfs.required untouched.
  • If an image ever ran git lfs install (setting filter.lfs.required=true in system/global git config) and later had the git-lfs binary removed, that flag persists. Since a disabled filter still counts as "configured" to git, checkout treats the (expected) filter failure as fatal and aborts with smudge filter lfs failed instead of falling back to the LFS pointer stub.
  • Adds filter.lfs.required=false to the disable-filter args, and updates the e2e LFS test fixture to simulate the stale required=true config so this regresses loudly if reintroduced.

Summary by CodeRabbit

  • Bug Fixes
    • Improved Git LFS filter configuration handling when LFS is disabled.
    • Prevented stale global LFS settings from incorrectly affecting repositories with local filter configurations.
    • Updated end-to-end coverage for required and optional LFS filters.

…sing

A prior `git lfs install` on an image can leave filter.lfs.required=true
in system/global git config even after the git-lfs binary is removed.
With it set, disabling the smudge/clean/process filters isn't enough:
git still treats the filter as required and aborts checkout with
"smudge filter lfs failed" instead of falling back to the pointer stub.
@netlify

netlify Bot commented Jul 30, 2026

Copy link
Copy Markdown

Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit 7e5ce0d
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6a6bd5196f41030008de5775

@netlify

netlify Bot commented Jul 30, 2026

Copy link
Copy Markdown

Deploy Preview for images-devsy-sh canceled.

Name Link
🔨 Latest commit 7e5ce0d
🔍 Latest deploy log https://app.netlify.com/projects/images-devsy-sh/deploys/6a6bd5195317c60008def689

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f74cb609-d666-426f-99e6-104978ff3265

📥 Commits

Reviewing files that changed from the base of the PR and between a4fbb4c and 7e5ce0d.

📒 Files selected for processing (2)
  • e2e/tests/up/git_lfs_test.go
  • pkg/git/lfs.go

📝 Walkthrough

Walkthrough

Git LFS configuration now marks disabled filters as non-required, while the e2e fixture distinguishes required stale global filters from non-required local filters.

Changes

Git LFS filter configuration

Layer / File(s) Summary
Filter requirement settings
pkg/git/lfs.go, e2e/tests/up/git_lfs_test.go
Disabled Git LFS filters explicitly set filter.lfs.required=false; the e2e fixture marks the stale global filter as required and its local filter as non-required.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes disabling the required Git LFS filter when the git-lfs binary is unavailable.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@skevetter
skevetter marked this pull request as ready for review July 30, 2026 23:02
@skevetter
skevetter enabled auto-merge (squash) July 30, 2026 23:18
@skevetter
skevetter merged commit 9996a88 into main Jul 30, 2026
66 checks passed
@skevetter
skevetter deleted the fix/lfs-filter-required-false branch July 30, 2026 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant