-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
.gitattributes
51 lines (49 loc) · 1.6 KB
/
.gitattributes
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
# Set go source line endings to LF on all platforms so gofmt can be used
*.go text=auto eol=lf
go.sum -diff -merge linguist-generated=true
*.pb.go -diff -merge
*.pb.go linguist-generated=true
*.pb.gw.go -diff -merge
*.pb.gw.go linguist-generated=true
*_easyjson.go -diff -merge
*_easyjson.go linguist-generated=true
pkg/security/probe/constantfetch/btfhub/constants.json -diff -merge linguist-generated=true
pkg/security/seclwin/** -diff -merge linguist-generated=true
# Fixtures should have LF line endings because they are checked against OCI packages built on Linux
pkg/fleet/installer/fixtures/** text=auto eol=lf
# Fix `git diff` when running on the below file formats.
# Our windows build image uses MinGit which tries to use the astextplain diff algorithm (https://git-scm.com/docs/gitattributes#_setting_the_internal_diff_algorithm).
# The astextplain binary is not embedded in the docker image making the git diff command fail when one of the below file formats is in the diff.
# The error is:
# ```
# error: cannot spawn astexplain: No such files or directory
# fatal: unable to read files diff
# ```
# We're overriding the MinGit default gitattributes config to avoid using astextplain on the file formats below.
# The MinGit's gitconfig file still have the problematic config though it should not use it anymore:
# ```
# [diff "astextplain"]
# textconv = astextplain
# ```
*.doc diff
*.DOC diff
*.docx diff
*.DOCX diff
*.docm diff
*.DOCM diff
*.dot diff
*.DOT diff
*.dotx diff
*.DOTX diff
*.dotm diff
*.DOTM diff
*.pdf diff
*.PDF diff
*.rtf diff
*.RTF diff
*.ods diff
*.ODS diff
*.odf diff
*.ODF diff
*.odt diff
*.ODT diff