mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-19 14:00:29 +00:00
Add explicit file-type rules to .gitattributes so text files are stored and checked out with LF line endings regardless of platform. This prevents issues where Windows git (or CI actions/checkout) converts LF to CRLF, breaking comptime parsers that split embedded files by '\n' and end up with trailing '\r' in parsed tokens. Key changes: - Source code (*.zig, *.c, *.h, etc.): always LF - Config/build files (*.zon, *.nix, *.md, etc.): always LF - Text data files (*.txt): always LF (for embedded file parsing) - Windows resource files (*.rc, *.manifest): preserve as-is (native Windows tooling expects CRLF) - Binary files: explicitly marked as binary Removed the legacy rgb.txt -text rule since *.txt now handles it uniformly with code-level CRLF handling as defense-in-depth.
54 lines
1.3 KiB
Plaintext
54 lines
1.3 KiB
Plaintext
# Source code - always LF
|
|
*.zig text eol=lf
|
|
*.c text eol=lf
|
|
*.h text eol=lf
|
|
*.cpp text eol=lf
|
|
*.m text eol=lf
|
|
*.swift text eol=lf
|
|
*.py text eol=lf
|
|
*.sh text eol=lf
|
|
|
|
# Config/build files - always LF
|
|
*.zon text eol=lf
|
|
*.nix text eol=lf
|
|
*.md text eol=lf
|
|
*.json text eol=lf
|
|
*.yml text eol=lf
|
|
*.yaml text eol=lf
|
|
*.toml text eol=lf
|
|
CMakeLists.txt text eol=lf
|
|
*.cmake text eol=lf
|
|
Makefile text eol=lf
|
|
|
|
# Text data files - always LF (embedded in Zig, parsed with \n split)
|
|
*.txt text eol=lf
|
|
|
|
# Windows resource files - preserve as-is (native Windows tooling)
|
|
*.rc -text
|
|
*.manifest -text
|
|
|
|
# Binary files
|
|
*.png binary
|
|
*.ico binary
|
|
*.icns binary
|
|
*.ttf binary
|
|
*.otf binary
|
|
*.glsl binary
|
|
*.blp binary
|
|
|
|
# Linguist overrides
|
|
build.zig.zon.nix linguist-generated=true
|
|
build.zig.zon.txt linguist-generated=true
|
|
build.zig.zon.json linguist-generated=true
|
|
vendor/** linguist-vendored
|
|
website/** linguist-documentation
|
|
pkg/breakpad/vendor/** linguist-vendored
|
|
pkg/glfw/wayland-headers/** linguist-vendored
|
|
pkg/libintl/config.h linguist-generated=true
|
|
pkg/libintl/libintl.h linguist-generated=true
|
|
pkg/simdutf/vendor/** linguist-vendored
|
|
src/font/nerd_font_attributes.zig linguist-generated=true
|
|
src/font/nerd_font_codepoint_tables.py linguist-generated=true
|
|
src/font/res/** linguist-vendored
|
|
src/terminal/res/** linguist-vendored
|