Modifier and Type | Field and Description |
---|---|
static String |
NAME
The pre-commit hook name.
|
Modifier | Constructor and Description |
---|---|
protected |
PreCommitHook(Repository repo,
PrintStream outputStream)
Constructor for PreCommitHook
|
protected |
PreCommitHook(Repository repo,
PrintStream outputStream,
PrintStream errorStream)
Constructor for PreCommitHook
|
Modifier and Type | Method and Description |
---|---|
Void |
call() |
String |
getHookName()
Get name of the hook
|
doRun, getErrorStream, getOutputStream, getParameters, getRepository, getStdinArgs, handleError, isNativeHookPresent
public static final String NAME
protected PreCommitHook(Repository repo, PrintStream outputStream)
This constructor will use the default error stream.
repo
- The repositoryoutputStream
- The output stream the hook must use. null
is allowed,
in which case the hook will use System.out
.protected PreCommitHook(Repository repo, PrintStream outputStream, PrintStream errorStream)
repo
- The repositoryoutputStream
- The output stream the hook must use. null
is allowed,
in which case the hook will use System.out
.errorStream
- The error stream the hook must use. null
is allowed,
in which case the hook will use System.err
.public Void call() throws IOException, AbortedByHookException
Run the hook.
call
in interface Callable<Void>
call
in class GitHook<Void>
IOException
AbortedByHookException
public String getHookName()
getHookName
in class GitHook<Void>
null
.Copyright © 2021 Eclipse JGit Project. All rights reserved.