Skip to content

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

Merged
asottile merged 1 commit intomasterfrom
hook_impl
Jan 22, 2020
Merged

Move most of the actual hook script into pre-commit hook-impl#1292
asottile merged 1 commit intomasterfrom
hook_impl

Conversation

@asottile
Copy link
Copy Markdown
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 Compare January 21, 2020 02:32
@asottile

This comment has been minimized.

@asottile
Copy link
Copy Markdown
Member Author

@asottile
Copy link
Copy Markdown
Member Author

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 Compare January 22, 2020 00:21
@asottile asottile merged commit f74e303 into master Jan 22, 2020
@asottile asottile deleted the hook_impl branch January 22, 2020 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant