Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support checking executable bit without Git. #750

Closed
wants to merge 2 commits into from
Closed

Support checking executable bit without Git. #750

wants to merge 2 commits into from

Commits on May 26, 2022

  1. Fix asymptomatic copy/paste bug in test.

    check_shebang_scripts_are_executable_test.test_git_executable_shebang
    manually filtered executable files out before calling
    check_shebang_scripts_are_executable. This makes sense in
    check_executables_have_shebangs.test_git_executable_shebang, because
    the check-executables-have-shebangs hook only runs on executable files.
    However, check-shebang-scripts-are-executable correctly runs on all text
    files, so the test shouldn't filter executable files out. The test still
    passed because when git ls-files is passed no files in particular, it
    lists all files in the Git repository that satisfy the given filters.
    Kurt-von-Laven committed May 26, 2022
    Configuration menu
    Copy the full SHA
    9245e07 View commit details
    Browse the repository at this point in the history
  2. Support checking executable bit without Git.

    The check-shebang-scripts-are-executable hook already avoided false
    negatives in a Git repository 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. Use the
    file mode in the file system when we are not in a Git clone or it is
    trusted by Git according to its core.fileMode config variable.
    Kurt-von-Laven committed May 26, 2022
    Configuration menu
    Copy the full SHA
    314fa53 View commit details
    Browse the repository at this point in the history