public interface PostReceiveHook
ReceivePack
after all updates are executed.
The hook is called after all commands have been processed. Only commands with
a status of ReceiveCommand.Result.OK
are passed into the hook. To get
all commands within the hook, see BaseReceivePack.getAllCommands()
.
Any post-receive hook implementation should not update the status of a command, as the command has already completed or failed, and the status has already been returned to the client.
Hooks should execute quickly, as they block the server and the client from completing the connection.
Modifier and Type | Field and Description |
---|---|
static PostReceiveHook |
NULL
A simple no-op hook.
|
Modifier and Type | Method and Description |
---|---|
void |
onPostReceive(ReceivePack rp,
Collection<ReceiveCommand> commands)
Invoked after all commands are executed and status has been returned.
|
static final PostReceiveHook NULL
void onPostReceive(ReceivePack rp, Collection<ReceiveCommand> commands)
rp
- the process handling the current receive. Hooks may obtain
details about the destination repository through this handle.commands
- unmodifiable set of successfully completed commands. May be
the empty set.Copyright © 2016 Eclipse JGit Project. All rights reserved.