-
-
Notifications
You must be signed in to change notification settings - Fork 933
Commit without executing hooks #468
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
Comments
We could just add another keyword parameter called |
Thanks for bringing this to my attention ! I see the problem, and as a workaround for now, you could use git directly, such as in Having something like the |
Sounds good. One suggestion though: should we stick with the same name for the parameter that git also uses? So |
Either way is fine with me. I understand those who say that 'no-verify' is a misleading (hooks can do more than just verify after all), and 'skip_hooks' would do exactly what it says it does. One could add that GitPython supports the same arguments as the git process by just passing them through, and may thus use its own parameter names for its own implementation. Personally I lean towards |
It was only a minor suggestion, I would not have minded either name I think. My discovery path with GitPython has often been that I know how to achieve something in Git, and then I would search the docs. In this case, I would possibly not find It's a tough balance to strike as a library author: do you fix the thing you're wrapping, or do you mimic it (warts and all included)? Perhaps a pragmatic approach here is to just use |
Your suggestion seems like a solution to all problems you mentioned. I like it a lot ! |
Tips on how to write tests for #479 much appreciated. |
Commit without executing hooks, fixes #468
If I do
index.commit(msg)
it will executepre-commit
andpost-commit
That makes it very hard to do the equivalent of
git commit -m "msg" --no-verify
(same asgit commit -m "msg" -n
).The text was updated successfully, but these errors were encountered: