-
Notifications
You must be signed in to change notification settings - Fork 821
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
mention pre-commit hook in readme #2156
Comments
Unfortunately it is not so simple... To keep amending possible change described in http://codeinthehole.com/writing/tips-for-using-a-Git-pre-commit-hook/#comment-645959940 was necessary. To handle also Windows it should be written in something more portable.
|
Does this work with |
Yes, it works. On On commit "stashing all unindexed changes" branch is used - so unindexed changes (not selected in Now normal commit happens, with only staged changes commited. The only potential problem is with unstashed changes not applying cleanly, but for now I am unable to answer whatever it is purely theoretical. |
And thanks for |
Made obsolete by #2473. |
I just discovered that it is possible to autoregenerate and autocommit .mml file on every commit including change of .yaml.
Solution is quite simple - create
.git/hooks/pre-commit
file with following content.Before every commit it runs ./scripts/yaml2mml.py script and commits result what should ensure correct content in .mml file without manual regeneration.
If there are no unforeseen consequences here it may be a good idea to mention it in contributing file.
Unfortunately there is no clean method to make this file part of repo... There is http://pre-commit.com/#install that requires anyway installation. Maybe add script that would create this file?
The text was updated successfully, but these errors were encountered: