public class LfsPrePushHook extends PrePushHook
| Modifier and Type | Field and Description |
|---|---|
protected PrintStream |
outputStream
The output stream to be used by the hook.
|
NAME| Constructor and Description |
|---|
LfsPrePushHook(Repository repo,
PrintStream outputStream) |
| Modifier and Type | Method and Description |
|---|---|
String |
call() |
protected void |
doRun()
Runs the hook, without performing any validity checks.
|
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
public LfsPrePushHook(Repository repo, PrintStream outputStream)
repo - the repositoryoutputStream - 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 void doRun()
throws AbortedByHookException
AbortedByHookException - If the underlying hook script exited with non-zero.public boolean isNativeHookPresent()
Copyright © 2019 Eclipse JGit Project. All rights reserved.