Browse Source

build: preserve line endings in patches

David Sanders 9 months ago
parent
commit
979e782744
1 changed files with 4 additions and 3 deletions
  1. 4 3
      .gitattributes

+ 4 - 3
.gitattributes

@@ -1,8 +1,9 @@
-# `git apply` and friends don't understand CRLF, even on windows. Force those
-# files to be checked out with LF endings even if core.autocrlf is true.
-*.patch text eol=lf
 patches/**/.patches merge=union
 
+# Patches must use the line endings of their target files. Otherwise they will
+# fail to apply properly.
+*.patch -eol
+
 # Source code and markdown files should always use LF as line ending.
 *.c text eol=lf
 *.cc text eol=lf