Commit a7967e5
committed
Limit header attributes to vendored DLPack
The old attributes treated every .h and .hpp file as binary, then carved out
path-specific exceptions for headers maintained in this repository. That was
based on an outdated assumption that checked-in headers were broadly generated
or hands-off inputs.
The tracked header set is much smaller and clearer: the only header that needs
Git-level byte preservation is the vendored DLPack header. Keep that file opted
out of Git text normalization with -text and an explicit !eol reset, while
forcing text diffs so review output stays readable.
All other tracked headers now inherit the repository default text eol=lf
behavior, consistent with Python files and other normal source. This includes
repo-owned C++ helpers as well as the AOTI shim adaptation, which is
third-party-derived but maintained here rather than a byte-for-byte vendored
header.
For a fresh clone, this should not change the bytes of the nine existing
tracked headers on Linux or Windows. The blobs are already stored with LF line
endings. On main, exception headers checked out as LF via text eol=lf while the
remaining binary-classified headers were written as raw LF blob bytes. After
this change, ordinary headers still check out as LF via text eol=lf, and
DLPack remains raw LF. For a fresh clone, the only observable change is Git
behavior: ordinary headers stop being binary-classified, and DLPack remains
no-normalization but becomes text-diffable.
Pre-commit behavior is unchanged and still governed by hook-specific matching.1 parent 7a9ee61 commit a7967e5
1 file changed
Lines changed: 2 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
| 4 | + | |
| 5 | + | |
13 | 6 | | |
14 | 7 | | |
15 | 8 | | |
| |||
0 commit comments