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, setRemoteName
protected final PrintStream outputStream
public LfsPrePushHook(Repository repo, PrintStream outputStream)
repo
- the repositoryoutputStream
- not used by this implementationpublic void setRefs(Collection<RemoteRefUpdate> toRefs)
PrePushHook
setRefs
in class PrePushHook
toRefs
- a collection of RemoteRefUpdate
spublic String call() throws IOException, AbortedByHookException
PrePushHook
Run the hook.
call
in interface Callable<String>
call
in class PrePushHook
IOException
AbortedByHookException
protected 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.