Skip to content

Commit d57eecb

Browse files
committed
chore: 规范行尾并对齐 .gitattributes / .gitignore 的目录匹配
- .gitattributes:新增 * text=auto eol=lf 统一 LF(bat/cmd 保 CRLF), 图片标 binary,vendored 改为 ** 递归匹配。 - .gitignore:documentation/img 放行改为递归(!documentation/img/**), 与 .gitattributes 口径一致,避免子目录下的图被误忽略。
1 parent 5427eca commit d57eecb

2 files changed

Lines changed: 24 additions & 10 deletions

File tree

.gitattributes

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,25 @@
1-
# Mark third-party and build artifacts as vendored / excluded from stats
2-
benchmarks/taskflow/* linguist-vendored
3-
build/* linguist-vendored
4-
documentation/img/* linguist-vendored
1+
# ── 行尾规范化 ──────────────────────────────────────────────
2+
# 所有文本文件在仓库内统一存为 LF,签出时按属性处理。
3+
# 杜绝 Windows 贡献者引入 CRLF 导致的 clang-format 行尾 diff。
4+
* text=auto eol=lf
55

6-
# C++ source files
6+
# Windows 批处理必须 CRLF,否则可能无法执行
7+
*.bat text eol=crlf
8+
*.cmd text eol=crlf
9+
10+
# ── 二进制文件(禁止行尾/编码转换、不参与 diff)──────────────
11+
*.png binary
12+
*.jpg binary
13+
*.jpeg binary
14+
*.gif binary
15+
*.ico binary
16+
17+
# ── 第三方与构建产物:排除出语言统计 ─────────────────────────
18+
benchmarks/taskflow/** linguist-vendored
19+
build/** linguist-vendored
20+
documentation/img/** linguist-vendored
21+
22+
# ── 语言标注 ────────────────────────────────────────────────
723
*.cpp linguist-language=C++
824
*.hpp linguist-language=C++
9-
*.h linguist-language=C++
25+
*.h linguist-language=C++

.gitignore

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,5 @@ cmake-build-*/
1414
Thumbs.db
1515

1616
# D2 output
17-
*.svg
18-
*.png
19-
!documentation/img/*.svg
20-
!documentation/img/*.png
17+
!documentation/img/**/*.svg
18+
!documentation/img/**/*.png

0 commit comments

Comments
 (0)