Files
hermes-agent/.gitattributes
BearHuddleston 33f2bd34c5 fix(ci): check the prompt-surface snapshot out with LF on every host
prompt_surface.py now writes the snapshot with LF on Windows and the
snapshot test compares bytes, but .gitattributes pinned only the .json
files. The prompts/*.txt files fell under "* text=auto", so a Windows clone
with core.autocrlf=true (the Git for Windows default) checked them out as
CRLF, and every prompt read as stale on a clean checkout.

Pin the whole snapshot directory to eol=lf. The new test checks that every
snapshot file resolves to eol=lf. On a core.autocrlf=true checkout of
2304f34aea, both it and test_committed_prompt_surface_is_current fail, with
all 9 prompts stale. With this .gitattributes the same checkout passes 3/3.

Found by the sol-loop review on #159146.
2026-11-23 08:23:46 +00:00

51 lines
1.8 KiB
Plaintext

# Auto-generated files — collapse diffs and exclude from language stats
pnpm-lock.yaml linguist-generated=true
**/package-lock.json linguist-generated=true
nix/node-gyp-11-4-0-package-lock.json linguist-generated=true
uv.lock text eol=lf
# Enforce LF for scripts that run inside Linux containers.
# Without this, Windows checkout converts to CRLF and breaks `exec` in the
# container entrypoint with "no such file or directory".
*.sh text eol=lf
Dockerfile text eol=lf
*.dockerfile text eol=lf
docker/entrypoint.sh text eol=lf
# Every file git detects as text is stored with LF; the rules below also pin the checkout.
* text=auto
# Enforce LF for all source/text files. Windows editors and tools default to
# CRLF; without normalization a Windows contributor's edit turns into a
# whole-file phantom diff (every line "changed" by its ending), breaks
# string-match patch tooling, and pollutes review. `text` normalizes to LF
# at check-in; `eol=lf` also checks out as LF so the working tree matches
# the index on every platform. PowerShell files are the deliberate
# exception (PS 5.1 tooling expects CRLF).
*.py text eol=lf
*.ts text eol=lf
*.tsx text eol=lf
*.js text eol=lf
*.mjs text eol=lf
*.cjs text eol=lf
*.cts text eol=lf
*.mts text eol=lf
*.jsx text eol=lf
*.json text eol=lf
*.yaml text eol=lf
*.yml text eol=lf
*.toml text eol=lf
*.md text eol=lf
*.css text eol=lf
*.html text eol=lf
*.svg text eol=lf
*.ps1 text eol=crlf
# scripts/ci/prompt_surface.py renders this snapshot with LF on every host and compares bytes.
tests/fixtures/prompt_surface/** text eol=lf
# Shims at old module paths: hermes_agent/compat/required_names.py
# BEGIN shims (generated by scripts/move/generate_shims.py; do not edit)
/tools/plugin_guard.py linguist-generated=true
# END shims