-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitattributes
More file actions
75 lines (69 loc) 路 4.23 KB
/
Copy path.gitattributes
File metadata and controls
75 lines (69 loc) 路 4.23 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Line endings the tooling depends on.
#
# EVERYTHING IS LF UNLESS A LATER RULE SAYS OTHERWISE. This file used to name
# only the trees whose bytes are hashed, which left every other text file at the
# mercy of the checker-out's core.autocrlf - and that is not a cosmetic
# difference here, for three reasons:
#
# 1. A DISTRIBUTION ships text files that are compared by hash. The
# distributer records a sha256 per shipped file and the release publishes
# SHA256SUMS.txt, so "the zip you downloaded" and "the commit it came from"
# have to agree byte for byte. With autocrlf=true a fresh Windows checkout
# materialised 177 of these files as CRLF, so a recipient verifying a file
# against the repository would see a difference that is not a difference.
# 2. Every pinned tree below is pinned for exactly this reason already, and
# those local rules cannot help a file nobody named.
# 3. LF is what the repository STORES either way - git normalises on commit -
# so this rule only stops the checkout from disagreeing with the commit.
#
# The batch and cmd files are the deliberate exception, and because the LAST
# matching rule wins, their `eol=crlf` lines sit BELOW this one on purpose.
* text=auto eol=lf
# A CRLF shebang breaks `./install.sh` on macOS/Linux, so shell scripts are
# pinned to LF no matter which OS checks the repo out. (Kept explicit even
# though the catch-all above already covers it: it is the rule that must not be
# lost if the catch-all is ever narrowed.)
*.sh text eol=lf
# Batch files are the Windows launchers; CRLF is what cmd.exe expects. *.cmd is
# listed for the same reason: scripts/console/adapt.cmd is the `call`ed console
# helper every entry point shares, and a launcher whose line endings depend on
# who checked it out is a launcher that works on one machine.
*.bat text eol=crlf
*.cmd text eol=crlf
# The forked browser bundles are GENERATED and byte-compared by
# scripts/sync-vendored.ps1 (-Check hashes the working copy). With git's
# autocrlf the Windows checkout would rewrite them to CRLF and report phantom
# drift, so they are pinned to LF too.
packages/*/lib/client.js text eol=lf
# The vendored pdf.js tree is GENERATED and byte-hashed by
# packages/dsh-pdf/vendor/build.mjs --check (every file's sha256 plus a digest
# over each tree, recorded in lib/vendor/VERSION.json), so its TEXT files are
# pinned to LF for exactly the reason the forked bundles above are: a Windows
# checkout would rewrite them to CRLF and report phantom drift - and the LICENSE
# files live INSIDE the hashed cMap, standard-font and wasm trees, so converting
# them would change a tree digest too. The .bcmap, .pfb/.ttf and .wasm binaries
# are detected as binary and are never touched.
packages/dsh-pdf/lib/vendor/*.mjs text eol=lf
packages/dsh-pdf/lib/vendor/VERSION.json text eol=lf
packages/dsh-pdf/lib/vendor/LICENSE text eol=lf
packages/dsh-pdf/lib/vendor/cmaps/LICENSE text eol=lf
packages/dsh-pdf/lib/vendor/standard_fonts/LICENSE_* text eol=lf
packages/dsh-pdf/lib/vendor/wasm/LICENSE_* text eol=lf
packages/dsh-pdf/lib/vendor/wasm/*.js text eol=lf
# dsh-canvas's vendored font tree is the same contract: VERSION.json records a
# sha256 per file and per licence text, and vendor/build.mjs --check re-reads them
# offline - so its TEXT files (the two OFL licence texts and the record itself)
# are pinned to LF here as well as by the catch-all above. The .woff2 subsets are
# binary and are never touched.
packages/dsh-canvas/lib/vendor/fonts/*.txt text eol=lf
packages/dsh-canvas/lib/vendor/fonts/VERSION.json text eol=lf
# dsh-canvas's vendored Konva surface is GENERATED and byte-hashed by
# packages/dsh-canvas/vendor/konva/build.mjs --check (a sha256 per file, recorded in
# lib/vendor/konva/VERSION.json beside the tarball's sha512), so its TEXT files are
# pinned to LF here as well as by the catch-all above: a Windows checkout would
# otherwise rewrite the 188 KB browser build to CRLF and report phantom drift on the
# one file whose entire point is that its bytes are pinned. The build itself
# normalises CRLF away before hashing, so the record and the checkout agree.
packages/dsh-canvas/lib/vendor/konva/*.js text eol=lf
packages/dsh-canvas/lib/vendor/konva/*.txt text eol=lf
packages/dsh-canvas/lib/vendor/konva/VERSION.json text eol=lf