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

Move most of the actual hook script into `pre-commit hook-impl` #1292

Merged
merged 1 commit into from Jan 22, 2020

Conversation

@asottile
Copy link
Member

@asottile asottile commented Jan 20, 2020

this patch is mostly about portability:

  • #!/usr/bin/env {python} would often end up with python on macos even if there's a python3 available
  • the syntax of .git/hooks/{hook_script} contained py3+ syntax
  • on windows, python's exec doesn't quite work all that well (? needs more investigation)
@asottile asottile force-pushed the hook_impl branch 2 times, most recently from 4e78b8f to 2312d8e Jan 21, 2020
@asottile

This comment has been hidden.

@asottile
Copy link
Member Author

@asottile asottile commented Jan 21, 2020

@asottile
Copy link
Member Author

@asottile asottile commented Jan 21, 2020

found why os.exec* is utterly useless on windows as well: https://bugs.python.org/issue19124

@asottile asottile force-pushed the hook_impl branch 4 times, most recently from d748262 to b9e4551 Jan 21, 2020
@asottile asottile force-pushed the hook_impl branch from b9e4551 to 95b8d71 Jan 22, 2020
@asottile asottile merged commit f74e303 into master Jan 22, 2020
1 check passed
1 check passed
pre-commit.pre-commit #20200122.3 succeeded
Details
@asottile asottile deleted the hook_impl branch Jan 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant
You can’t perform that action at this time.