Check Git core.fileMode rather than infer from OS. · pre-commit/pre-commit-hooks@2cbabf9 · GitHub
Skip to content

Commit 2cbabf9

Browse files
Check Git core.fileMode rather than infer from OS.
There was already a guard preventing the check-executables-have-shebangs hook from raising false positives on win32 by looking up the Git file mode rather than relying on the file mode in the file system. Git already automatically probes the file system for executable bit support. Leverage Git's core.fileMode config variable to prevent false positives on all file systems that don't track executable bits.
1 parent f5c2675 commit 2cbabf9

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

pre_commit_hooks/check_executables_have_shebangs.py

Lines changed: 4 additions & 1 deletion

0 commit comments

Comments
 (0)