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 post-checkout #1120

Closed
domenkozar opened this issue Aug 16, 2019 · 2 comments · Fixed by #1339
Closed

Support post-checkout #1120

domenkozar opened this issue Aug 16, 2019 · 2 comments · Fixed by #1339
Labels

Comments

@domenkozar
Copy link

I know this goes beyond the original intention (and the name), but it would be really useful to be able to use same pre-commit hooks for different git hooks.

We need to run some validation before checking out. The alternative is to use https://github.com/sds/overcommit, but I'd prefer for pre-commit to get better.

@asottile
Copy link
Member

sure! there's already a few other git hooks supported and it shouldn't be too much work to add another one -- would you like to take a stab at it? here's where prepare-commit-msg was added for example: #1004

given the others are currently file-based there might need to be some design aspects to this particular hook since post-checkout doesn't really operate on files

@asottile
Copy link
Member

oh right -- this got released as part of 2.2.0 -- thanks again for the issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

2 participants