You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-5Lines changed: 9 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -173,18 +173,22 @@ Your hook's check function will get called with a log and a revdata object:
173
173
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.
174
174
You can get the complete list of the accessible fields by looking at the documentation of the class for the hook in question.
175
175
176
-
If you want to know the field available in `revdata` for the `pre-commit` hook for git. Look into `hooklib_git.py`, find the class `gitprecommitinputparser` and look at its pydoc:
176
+
If you want to know the field available in `revdata` for the `pre-receive` hook for git. Look into `hooklib_git.py`, find the class `gitprereceiveinputparser` and look at its pydoc:
177
177
178
178
In a python shell:
179
179
180
180
```
181
181
>>> from hooklib_git import *
182
-
>>> help(gitprecommitinputparser)
183
-
class gitprecommitinputparser(basegitinputparser)
184
-
| Input parser for the 'pre-commit' phase
182
+
>>> help(gitprereceiveinputparser)
183
+
Help on class gitprereceiveinputparser in module hooklib_git:
184
+
185
+
class gitprereceiveinputparser(gitreceiveinputparser)
186
+
| input parser for the 'pre-receive' phase
185
187
|
186
-
| Available fields:
188
+
| available fields:
187
189
| - reporoot (str) => root of the repo
190
+
| - receivedrevs =>
191
+
| (list of tuples: (<old-value> <new-value> <ref-name>))
0 commit comments