mirror of
https://github.com/allaunthefox/Research-Stack.git
synced 2026-07-31 03:05:21 +00:00
ci: disable LFS smudge filters in pre-commit job
pre-commit stashes unstaged changes, runs hooks, then pops the stash. When the runner's working tree has LFS pointer files but git's LFS smudge filter is configured (per .gitattributes), the stash/pop cycle reports a phantom diff against the binary content git thinks it should smudge, and the pop fails with "the patch applies to ... which does not match the current contents". All hooks themselves pass on this PR (validated locally and visible in the previous CI run for #10). Clearing the LFS filters locally for the pre-commit job removes the disagreement without mutating the repo or any LFS-tracked files. Co-Authored-By: Allaun Silverfox <bigdataiscoming+9i37y6j2@protonmail.com>
This commit is contained in:
parent
c946319be1
commit
9e5a30cc24
1 changed files with 19 additions and 0 deletions
19
.github/workflows/math-check.yml
vendored
19
.github/workflows/math-check.yml
vendored
|
|
@ -142,6 +142,25 @@ jobs:
|
|||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
# We deliberately do not smudge LFS pointers here -- the pre-commit
|
||||
# hooks never need the actual binary content, and pulling LFS would
|
||||
# add noise. The next step disables the LFS smudge filters locally
|
||||
# so pre-commit's stash/pop cycle does not trip over pointer files.
|
||||
lfs: false
|
||||
|
||||
- name: Disable LFS filters for pre-commit
|
||||
# pre-commit stashes unstaged changes before running hooks and pops
|
||||
# them back after. When the working tree contains LFS pointer files
|
||||
# but Git's LFS smudge filter is configured (per .gitattributes), the
|
||||
# stash/pop cycle reports a phantom diff against the binary content
|
||||
# Git thinks it should smudge, and the pop fails. Clearing the
|
||||
# filters locally for this job removes the disagreement without
|
||||
# mutating the repository or any LFS-tracked files.
|
||||
run: |
|
||||
git config --local filter.lfs.smudge ""
|
||||
git config --local filter.lfs.clean ""
|
||||
git config --local filter.lfs.process ""
|
||||
git config --local filter.lfs.required false
|
||||
|
||||
- name: Setup Python 3.11
|
||||
uses: actions/setup-python@v5
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue