aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2021-03-13 14:11:59 -0800
committerGravatar MarkKoz <[email protected]>2021-03-13 14:19:24 -0800
commitc0d8b0e781fdd7638d0a0f31d7a3317cdc797e5a (patch)
tree77010a5f11a7e595ee749ac6816e787344517780
parentmaster => main (diff)
Use .gitattributes to normalise line endings on check-in
Remove the mixed line endings pre-commit hook because it is obsolete. Relying on git to handle line endings means contributors have more flexibility with which line endings they want to use on check-out. The settings in .gitattributes only impose which line endings will be used upon check-in (LF), which should not impact local development; git will still respect the core.eol and core.autocrlf settings.
-rw-r--r--.gitattributes1
-rw-r--r--.pre-commit-config.yaml2
2 files changed, 1 insertions, 2 deletions
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 000000000..176a458f9
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+* text=auto
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 1597592ca..52500a282 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -7,8 +7,6 @@ repos:
- id: check-yaml
args: [--unsafe] # Required due to custom constructors (e.g. !ENV)
- id: end-of-file-fixer
- - id: mixed-line-ending
- args: [--fix=lf]
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- repo: https://github.com/pre-commit/pygrep-hooks