Skip to content

evidence-not-lfs

Rung evidence · correctness · default error

The project has frames, and .gitattributes does not store the evidence blob directory through Git LFS.

Screenshots are large, and a regular git object stays in history for every clone forever. Evidence is stored through Git LFS so that checking out the project is cheap and the frames are fetched when needed. A blob committed outside LFS defeats that, and once it is in history it cannot be taken back cheaply. Once the manifest has a frame, lint reads the project’s own .gitattributes and asks, for the real blob path of every frame, whether it gets filter=lfs, as git would: a pattern without a slash matches the file name at any depth, and the last matching line wins. A pattern that covers only some blobs (*.png, when a frame is a .jpg) fails, and the finding names the first blob it misses and counts the rest. A bare filter, -filter, !filter or another filter= value turns LFS off for the path. [attr] macro definitions are not expanded, so a line that uses a macro does not count as LFS: write the filter=lfs attributes out. It reports once per project, on .gitattributes, or on the manifest when there is no .gitattributes.

The patterns must be in the project’s own .gitattributes, relative to it. A host sees only the project folder, so lint does not read a .gitattributes further up the repository, even where git would honour one. A project in a subdirectory of its repository therefore needs its own file.

Add the LFS line for the blob directory to the project’s own .gitattributes. gantry init writes it. Otherwise run, from the project directory (the one holding gantry.yaml, which is not always the repository root):

Terminal window
git lfs track "docs/design/evidence/blobs/**"

git lfs track writes to the .gitattributes in the directory it runs from, with the pattern exactly as given and relative to that directory; run from a subdirectory it does not touch the repository root’s file. Use your content directory in place of docs/design. Then re-add the frames with gantry evidence add. Run git lfs migrate if a blob is already committed as a regular object.

docs/design/evidence/blobs/** filter=lfs diff=lfs merge=lfs -text