Repository navigation
Expand file tree
/
Copy path.gitattributes
More file actions
29 lines (25 loc) · 1.48 KB
/
Copy path.gitattributes
File metadata and controls
29 lines (25 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Shell scripts must use LF line endings. core.autocrlf=true would otherwise
# convert them to CRLF on checkout, which breaks bash on Windows Git Bash
# (stray \r corrupts commands and string comparisons). This applies to the
# .claude/hooks/*.sh hooks and .claude/scripts/*.sh.
*.sh text eol=lf
# awk programs the helpers read with `awk -f` (yaml-get.awk). Git Bash gawk
# tolerates CRLF; mawk and BWK awk may not, so they are checked out LF too.
*.awk text eol=lf
# .worktreeinclude is a pattern list Claude Code reads when it creates a
# worktree. A CRLF checkout would end every pattern in \r, and a parser that
# does not strip it matches nothing, so the local config is silently not copied.
.worktreeinclude text eol=lf
# Tabular data is compared byte-for-byte by tooling that diffs it against
# freshly-generated output (which is always LF). A CRLF checkout would make
# every line differ, silently breaking any such comparison.
*.tsv text eol=lf
# Markdown under .claude/ is authored LF. Two concrete reasons:
# - tooling that flattens SKILL.md files and substring-matches sentences
# breaks on a stray \r mid-sentence: every multi-line match fails, and
# the tooling then reports rules as lost that are present.
# - a CRLF file produces a whole-file diff the first time anyone edits it,
# which buries real changes.
# .gitattributes governs the INDEX. It does not retro-fix a working tree that
# predates the rule -- run `git add --renormalize .` for that.
.claude/**/*.md text eol=lf