◐ Shell
clean mode source ↗

Check Git core.fileMode rather than infer from OS. by Kurt-von-Laven · Pull Request #730 · pre-commit/pre-commit-hooks

@Kurt-von-Laven changed the title Check Git file mode rather than infer from OS. Check Git core.fileMode rather than infer from OS.

Mar 22, 2022

asottile

asottile

Kurt-von-Laven

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.

asottile