Skip to content

Commit fdafeba

Browse files
committed
Update README.md
1 parent 6208780 commit fdafeba

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,9 @@ User Guide
166166
Once you have installed the library, you can start writing you first hook.
167167
You can start by taking one of the example as a template.
168168
Your hook's check function will get called with a log and a revdata object:
169-
- The check function should return True if the hook passes and False otherwise.
170-
- The log object can be used to send feedback to the user, for example, if your hook rejects a commit, you can explain what justifies the rejection.
171-
- The revdata object allows you to get all the information that you need to make the decision of returning True or False from your hook. It contains different information based on what hook you are writing and it is based on what git or hg gives as argument and environment variable when calling the hook.
169+
- The `check` function should return True if the hook passes and False otherwise.
170+
- The `log` object can be used to send feedback to the user, for example, if your hook rejects a commit, you can explain what justifies the rejection. You can use `log.write(str)` as shown in the examples
171+
- The `revdata` object allows you to get all the information that you need about the state of the repo.
172172

173173
For example, if you are writing a `commit-msg` hook, `revdata.messagefile` will be the filename of the file containing the commit message to validate.
174174
You can get the complete list of the accessible fields by looking at the documentation of the class for the hook in question.

0 commit comments

Comments
 (0)