fix(repo): store the producer fixtures as the LFS pointers they declare - #3124
Open
miguel-heygen wants to merge 1 commit into
Open
fix(repo): store the producer fixtures as the LFS pointers they declare#3124miguel-heygen wants to merge 1 commit into
miguel-heygen wants to merge 1 commit into
Conversation
.gitattributes routes packages/producer/tests compiled fixtures through LFS, and the largest are 2.6 to 3.3 MB, so that routing is right. But only 7 of the 74 were actually stored as pointers. The other 67 were committed as plain content, most likely predating the attribute. A file marked for LFS but stored as content cannot be checked out cleanly: the filter converts it to a pointer, git sees that as a modification, and the file is permanently dirty. It fails with a should-have-been-pointers error. That is not cosmetic. It blocks git restore, git rebase, and even rebase with autostash, all of which fail with an unstaged-changes error naming files the developer never touched. git lfs fetch and git lfs checkout do not help, because there are no pointers to resolve. On one branch it made a routine rebase onto main impossible. Renormalizing re-runs the filter and stores what the attribute always said it would. The LFS objects already existed locally, so the pointers resolve. History still carries the original blobs. This fixes checkout, not the pack.
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.
What
Store the 67 producer test fixtures that
.gitattributesroutes through LFS as the pointers it declares. 68 files, 201 insertions, 47,304 deletions.Why
.gitattributeshas routedpackages/producer/tests/**/output/compiled.htmlthrough LFS for a while, and the largest of these fixtures are 2.6 to 3.3 MB, so that routing is correct. But only 7 of the 74 were actually stored as pointers. The other 67 sit in the pack as plain content, most likely predating the attribute.A file marked for LFS but stored as content cannot be checked out cleanly. The filter converts it to a pointer, git sees that as a modification, and the file is permanently dirty:
This is not cosmetic. It blocks
git restore,git rebase, and evengit rebase --autostash, all of which fail with an unstaged-changes error naming files the developer never touched:git lfs fetchandgit lfs checkoutdo not help, because there are no pointers to resolve. On a branch that needed to rebase onto main, this made a routine rebase impossible, and the failure mode gives no hint that LFS is involved.How
git add --renormalize packages/producer/testsre-runs the filter and stores what the attribute always said it would store. No history rewrite.The LFS objects already existed locally, so the pointers resolve immediately. Verified before committing:
That check matters: committing pointers whose objects do not exist would leave the fixtures unresolvable and break the producer tests. All 68 staged blobs were confirmed to be pointers (
pointers=68 non-pointers=0), and the push uploaded 44 MB of objects.Test plan
The verification for this change is the working tree itself:
git statusreports 0 modified files on a fresh checkout of this branch, where main reports 14 to 20 permanently dirty fixtures that no git command can clean.No test or source file is touched. The fixture content is unchanged; only where git stores it moves.
Not covered
History still carries the original blobs, so this shrinks new checkouts rather than the pack. Rewriting history to reclaim that is a separate, far more disruptive decision.
The 7 fixtures already stored as pointers are untouched.