Skip to content

Commit c0d8b0e

Browse files
committed
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.
1 parent a394c42 commit c0d8b0e

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto

.pre-commit-config.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ repos:
77
- id: check-yaml
88
args: [--unsafe] # Required due to custom constructors (e.g. !ENV)
99
- id: end-of-file-fixer
10-
- id: mixed-line-ending
11-
args: [--fix=lf]
1210
- id: trailing-whitespace
1311
args: [--markdown-linebreak-ext=md]
1412
- repo: https://github.com/pre-commit/pygrep-hooks

0 commit comments

Comments
 (0)