pre-commit hook implementation. This hook is run before the
commit and can reject the commit.
| Modifier and Type | Field and Description |
|---|---|
| public static final String | NAME
The pre-commit hook name. |
| Access | Constructor and Description |
|---|---|
| protected | PreCommitHook(Repository
The repository repo, PrintStream The output stream the hook must use. outputStream)null is allowed,
in which case the hook will use System.out.Constructor for PreCommitHook This constructor will use the default error stream. |
| protected | PreCommitHook(Repository
The repository repo, PrintStream The output stream the hook must use. outputStream, PrintStream null is allowed,
in which case the hook will use System.out.The error stream the hook must use. errorStream)null is allowed,
in which case the hook will use System.err.Constructor for PreCommitHook |
| Modifier and Type | Method and Description |
|---|---|
| public Void | call()
Implements abstract org. Implements java. Computes a result, or throws an exception if unable to do so. |
| public String |
| NAME | back to summary |
|---|---|
| public static final String NAME The pre-commit hook name. | |
| PreCommitHook | back to summary |
|---|---|
| protected PreCommitHook(Repository repo, PrintStream outputStream) Constructor for PreCommitHook This constructor will use the default error stream.
| |
| PreCommitHook | back to summary |
|---|---|
| protected PreCommitHook(Repository repo, PrintStream outputStream, PrintStream errorStream) Constructor for PreCommitHook
| |
| call | back to summary |
|---|---|
| public Void call() throws IOException, AbortedByHookException Implements abstract org. Implements java. Doc from org. Computes a result, or throws an exception if unable to do so. Run the hook.
| |
| getHookName | back to summary |
|---|---|
| public String getHookName() Implements abstract org. Doc from org. Get name of the hook | |