GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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

Conversation

@Kurt-von-Laven

@Kurt-von-Laven Kurt-von-Laven commented Feb 19, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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.

Fixes #690.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Kurt-von-Laven 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
@Kurt-von-Laven Kurt-von-Laven mentioned this pull request Mar 22, 2022
Check git mode also in WSL #512
Closed
@Kurt-von-Laven Kurt-von-Laven mentioned this pull request Mar 31, 2022
check-executables-have-shebangs Should Check Executable Bit According to Git Rather Than File System #690
Closed
asottile
asottile reviewed Apr 27, 2022
View reviewed changes
Comment thread pre_commit_hooks/check_executables_have_shebangs.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

asottile
asottile reviewed Apr 27, 2022
View reviewed changes
Comment thread pre_commit_hooks/check_executables_have_shebangs.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Kurt-von-Laven
Kurt-von-Laven commented Apr 28, 2022
View reviewed changes

@Kurt-von-Laven Kurt-von-Laven left a comment

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for spotting my trailing newline ('true\n' != 'true') bug.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pre_commit_hooks/check_executables_have_shebangs.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread pre_commit_hooks/check_executables_have_shebangs.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@Kurt-von-Laven
Check Git core.fileMode rather than infer from OS.
2cbabf9
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.
@Kurt-von-Laven

Kurt-von-Laven commented May 18, 2022

Copy link
Copy Markdown
Contributor Author

I believe this pull request is ready to be merged.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

asottile
asottile approved these changes May 26, 2022
View reviewed changes
@asottile
asottile merged commit 0a88f14 into pre-commit:main May 26, 2022
@Kurt-von-Laven
Kurt-von-Laven deleted the support-git-file-mode-false branch May 26, 2022 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@asottile asottile asottile approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

check-executables-have-shebangs Should Check Executable Bit According to Git Rather Than File System

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@Kurt-von-Laven @asottile
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.