Skip to content

Commit b347255

Browse files
authored
pre-commit: exclude soft-linked cuda_python/README.md from end-of-file-fixer (#1278)
On Linux (including WSL) the file cuda_python/README.md is a real symlink, whereas on Windows Git it is checked out as a plain file containing "../README.md" (without a trailing LF). When pre-commit runs under WSL, the end-of-file-fixer hook rewrites this file, and Git Bash can no longer handle the symlink-emulation file correctly, resulting in errors on subsequent git operations.
1 parent b1a6baf commit b347255

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ repos:
5353
- id: check-yaml
5454
- id: debug-statements
5555
- id: end-of-file-fixer
56-
exclude: &gen_exclude '^(?:cuda_bindings/cuda/bindings/.*\.in?|cuda_bindings/docs/source/module/.*\.rst?)$'
56+
exclude: &gen_exclude '^(?:cuda_python/README\.md|cuda_bindings/cuda/bindings/.*\.in?|cuda_bindings/docs/source/module/.*\.rst?)$'
5757
- id: mixed-line-ending
5858
- id: trailing-whitespace
5959
exclude: *gen_exclude

0 commit comments

Comments
 (0)