public class PreCommitHook extends GitHook<java.lang.Void>
pre-commit hook implementation. This hook is run before the
commit and can reject the commit.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NAME
The pre-commit hook name.
|
outputStream| Modifier | Constructor and Description |
|---|---|
protected |
PreCommitHook(Repository repo,
java.io.PrintStream outputStream)
Constructor for PreCommitHook
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Void |
call() |
java.lang.String |
getHookName()
Get name of the hook
|
doRun, getOutputStream, getParameters, getRepository, getStdinArgs, isNativeHookPresentpublic static final java.lang.String NAME
protected PreCommitHook(Repository repo, java.io.PrintStream outputStream)
repo - The repositoryoutputStream - The output stream the hook must use. null is allowed,
in which case the hook will use System.out.public java.lang.Void call()
throws java.io.IOException,
AbortedByHookException
Run the hook.
call in interface java.util.concurrent.Callable<java.lang.Void>call in class GitHook<java.lang.Void>java.io.IOExceptionAbortedByHookExceptionpublic java.lang.String getHookName()
getHookName in class GitHook<java.lang.Void>null.