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?
to your account
When I run git commit with certain arguments I expect to get two or more arguments passed to argv of my script as per the specification:
def main(argv, argc):
['tools/hooks/add-commit-template.py', '.git/COMMIT_EDITMSG'] 2
It looks to me from looking at your auto-created hook installed that you are passing all args to the script so it maybe I haven't configured this correctly.
- id: commit-template-local
name: Provide Commit Message Template
stages: [ prepare-commit-msg ]
The text was updated successfully, but these errors were encountered:
yep -- pre-commit is based on files -- for now the additional non-file arguments are discarded
there's precedent for other hook types to forward these arguments along (for example PRE_COMMIT_REMOTE_NAME for pre-push) -- it looks like these were just not implemented for prepare-commit-msg
please send a patch to add those if you'd like support for those as environment variables -- I'd grep around for PRE_COMMIT_REMOTE_NAME and follow the pattern used there
Sorry, something went wrong.
Ah, perfect I'm not going crazy. I'll have a look into this 🙂
Successfully merging a pull request may close this issue.