Repository navigation
Expand file tree
/
Copy path.gitattributes
More file actions
33 lines (31 loc) · 1.87 KB
/
Copy path.gitattributes
File metadata and controls
33 lines (31 loc) · 1.87 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
# Line-ending policy.
#
# This file exists because of a real failure, not as boilerplate. The PDF test fixtures are
# mostly printable ASCII with no NUL byte anywhere near the start, so Git's content detection
# classifies them as text — and on Windows, where `core.autocrlf` defaults to true, it
# rewrites every LF to CRLF on checkout. A PDF's cross-reference table is a list of absolute
# byte offsets, so that shifts every one of them and the file stops parsing entirely. CI
# caught it as 15 failing tests on windows-latest and nowhere else.
#
# Any fixture that is bytes-as-committed must be marked here. `binary` means "no diffing, no
# line-ending conversion".
* text=auto
# `**` rather than `*` so that fixtures in subdirectories — corpus/pdf/malformed/ — are
# covered too. PDFs are mostly printable ASCII, so Git classifies them as text and rewrites
# their line endings on a Windows checkout, which shifts every cross-reference offset and
# stops the file parsing. The other three formats already use `**` for this reason.
corpus/pdf/**/*.pdf binary
crates/strypt-core/fuzz/seeds/pdf/*.pdf binary
# The detection seeds have no extensions and are raw magic-number fragments.
crates/strypt-core/fuzz/seeds/detect/* binary
# JPEG fixtures. Git detects these as binary on content already; marked explicitly so the
# guarantee does not depend on that detection, for the same reason the PDFs are.
corpus/jpeg/**/*.jpg binary
crates/strypt-core/fuzz/seeds/jpeg/*.jpg binary
# PNG and WebP fixtures. Git detects both as binary on content already — a PNG has a NUL in
# its signature and a WebP has one in the size field at byte 5 — but they are marked for the
# same reason the JPEGs are: the guarantee should not rest on content detection.
corpus/png/**/*.png binary
crates/strypt-core/fuzz/seeds/png/**/*.png binary
corpus/webp/**/*.webp binary
crates/strypt-core/fuzz/seeds/webp/**/*.webp binary