User:Evilpie/commit-restrictions: Difference between revisions

Line 42: Line 42:
<pre>
<pre>
[hooks]
[hooks]
pretxncommit.good_commit_message = python:goodCommitMessage.hook
pretxncommit.good_commit_messages = python:good_commit_messages.hook
</pre>
</pre>
You probably need to add good_commit_message to your Python path
You probably need to add good_commit_messages.py to your Python path
<pre>
<pre>
export PYTHONPATH = ~/myhooks # assuming good_commit_message.py is in this folder
export PYTHONPATH = ~/myhooks # assuming good_commit_messages.py is in this folder
</pre>
</pre>
You can also edit good_commit_message.py to abort commits instead of warning.
You can also edit good_commit_messages.py to abort commits instead of warning. Search for <pre>fail not warn</pre> in the the file and change <pre>0</pre> to <pre>1</pre>
Confirmed users
149

edits