public class LfsPrePushHook extends PrePushHook
| Modifier and Type | Field and Description |
|---|---|
protected PrintStream |
errorStream
The error stream to be used by the hook.
|
protected PrintStream |
outputStream
The output stream to be used by the hook.
|
NAME| Constructor and Description |
|---|
LfsPrePushHook(Repository repo,
PrintStream outputStream) |
LfsPrePushHook(Repository repo,
PrintStream outputStream,
PrintStream errorStream) |
| Modifier and Type | Method and Description |
|---|---|
String |
call() |
protected void |
doRun()
Runs the hook, without performing any validity checks.
|
protected PrintStream |
getErrorStream()
Get error stream
|
protected PrintStream |
getOutputStream()
Get output stream
|
protected Repository |
getRepository()
Get the repository
|
boolean |
isNativeHookPresent()
Check whether a 'native' (i.e.
|
void |
setRefs(Collection<RemoteRefUpdate> toRefs)
Set Refs
|
getHookName, getParameters, getRemoteName, getStdinArgs, setRemoteLocation, setRemoteNameprotected final PrintStream outputStream
protected final PrintStream errorStream
public LfsPrePushHook(Repository repo, PrintStream outputStream)
repo - the repositoryoutputStream - not used by this implementationpublic LfsPrePushHook(Repository repo, PrintStream outputStream, PrintStream errorStream)
repo - the repositoryoutputStream - not used by this implementationerrorStream - not used by this implementationpublic void setRefs(Collection<RemoteRefUpdate> toRefs)
PrePushHooksetRefs in class PrePushHooktoRefs - a collection of RemoteRefUpdatespublic String call() throws IOException, AbortedByHookException
PrePushHookRun the hook.
call in interface Callable<String>call in class PrePushHookIOExceptionAbortedByHookExceptionprotected Repository getRepository()
protected PrintStream getOutputStream()
null,
System.out is returned by default.protected PrintStream getErrorStream()
null,
System.err is returned by default.protected void doRun()
throws AbortedByHookException
AbortedByHookException - If the underlying hook script exited with non-zero.public boolean isNativeHookPresent()
Copyright © 2021 Eclipse JGit Project. All rights reserved.