Top Description Constructors Methods
org.eclipse.jgit.hooks

public Class Hooks

extends Object
Class Inheritance
Imports
java.io.PrintStream, java.text.MessageFormat, org.eclipse.jgit.internal.JGitText, org.eclipse.jgit.lib.Repository, org.eclipse.jgit.util.LfsFactory

Factory class for instantiating supported hooks.
Since
4.0

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static CommitMsgHook

Returns:

The commit-msg hook for the given repository.
commitMsg
(Repository repo, PrintStream
The output stream, or null to use System.out
outputStream
)

Create commit-msg hook for the given repository with the default error stream

public static CommitMsgHook

Returns:

The pre-commit hook for the given repository.
commitMsg
(Repository repo, PrintStream
The output stream, or null to use System.out
outputStream
,
PrintStream
The error stream, or null to use System.err
errorStream
)

Create commit-msg hook for the given repository

public static PostCommitHook

Returns:

The post-commit hook for the given repository.
postCommit
(Repository repo, PrintStream
The output stream, or null to use System.out
outputStream
)

Create post-commit hook for the given repository with the default error stream

public static PostCommitHook

Returns:

The pre-commit hook for the given repository.
postCommit
(Repository repo, PrintStream
The output stream, or null to use System.out
outputStream
,
PrintStream
The error stream, or null to use System.err
errorStream
)

Create post-commit hook for the given repository

public static PreCommitHook

Returns:

The pre-commit hook for the given repository.
preCommit
(Repository repo, PrintStream
The output stream, or null to use System.out
outputStream
)

Create pre-commit hook for the given repository with the default error stream

public static PreCommitHook

Returns:

The pre-commit hook for the given repository.
preCommit
(Repository repo, PrintStream
The output stream, or null to use System.out
outputStream
,
PrintStream
The error stream, or null to use System.err
errorStream
)

Create pre-commit hook for the given repository

public static PrePushHook

Returns:

The pre-push hook for the given repository.
prePush
(Repository repo, PrintStream
The output stream, or null to use System.out
outputStream
)

Create pre-push hook for the given repository with the default error stream

public static PrePushHook

Returns:

The pre-push hook for the given repository.
prePush
(Repository repo, PrintStream
The output stream, or null to use System.out
outputStream
,
PrintStream
The error stream, or null to use System.err
errorStream
)

Create pre-push hook for the given repository

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Hooksback to summary
public Hooks()

Method Detail

commitMsgback to summary
public static CommitMsgHook commitMsg(Repository repo, PrintStream outputStream)

Create commit-msg hook for the given repository with the default error stream

Parameters
repo:Repository

a org.eclipse.jgit.lib.Repository object.

outputStream:PrintStream

The output stream, or null to use System.out

Returns:CommitMsgHook

The commit-msg hook for the given repository.

commitMsgback to summary
public static CommitMsgHook commitMsg(Repository repo, PrintStream outputStream, PrintStream errorStream)

Create commit-msg hook for the given repository

Parameters
repo:Repository

a org.eclipse.jgit.lib.Repository object.

outputStream:PrintStream

The output stream, or null to use System.out

errorStream:PrintStream

The error stream, or null to use System.err

Returns:CommitMsgHook

The pre-commit hook for the given repository.

Since
5.6
postCommitback to summary
public static PostCommitHook postCommit(Repository repo, PrintStream outputStream)

Create post-commit hook for the given repository with the default error stream

Parameters
repo:Repository

a org.eclipse.jgit.lib.Repository object.

outputStream:PrintStream

The output stream, or null to use System.out

Returns:PostCommitHook

The post-commit hook for the given repository.

Since
4.5
postCommitback to summary
public static PostCommitHook postCommit(Repository repo, PrintStream outputStream, PrintStream errorStream)

Create post-commit hook for the given repository

Parameters
repo:Repository

a org.eclipse.jgit.lib.Repository object.

outputStream:PrintStream

The output stream, or null to use System.out

errorStream:PrintStream

The error stream, or null to use System.err

Returns:PostCommitHook

The pre-commit hook for the given repository.

Since
5.6
preCommitback to summary
public static PreCommitHook preCommit(Repository repo, PrintStream outputStream)

Create pre-commit hook for the given repository with the default error stream

Parameters
repo:Repository

a org.eclipse.jgit.lib.Repository object.

outputStream:PrintStream

The output stream, or null to use System.out

Returns:PreCommitHook

The pre-commit hook for the given repository.

preCommitback to summary
public static PreCommitHook preCommit(Repository repo, PrintStream outputStream, PrintStream errorStream)

Create pre-commit hook for the given repository

Parameters
repo:Repository

a org.eclipse.jgit.lib.Repository object.

outputStream:PrintStream

The output stream, or null to use System.out

errorStream:PrintStream

The error stream, or null to use System.err

Returns:PreCommitHook

The pre-commit hook for the given repository.

Since
5.6
prePushback to summary
public static PrePushHook prePush(Repository repo, PrintStream outputStream)

Create pre-push hook for the given repository with the default error stream

Parameters
repo:Repository

a org.eclipse.jgit.lib.Repository object.

outputStream:PrintStream

The output stream, or null to use System.out

Returns:PrePushHook

The pre-push hook for the given repository.

Since
4.2
prePushback to summary
public static PrePushHook prePush(Repository repo, PrintStream outputStream, PrintStream errorStream)

Create pre-push hook for the given repository

Parameters
repo:Repository

a org.eclipse.jgit.lib.Repository object.

outputStream:PrintStream

The output stream, or null to use System.out

errorStream:PrintStream

The error stream, or null to use System.err

Returns:PrePushHook

The pre-push hook for the given repository.

Since
5.6