AsyncReceiveCommits#onPreReceive: Early exit when commands already processed
Change-Id: Ife5fecba72713ad7c5ab7847ff9a613d1602f474 Helped-by: David Ostrovsky <david@ostrovsky.org>
This commit is contained in:
parent
2919b01659
commit
ba8186d5dc
|
@ -256,6 +256,11 @@ public class AsyncReceiveCommits implements PreReceiveHook {
|
|||
|
||||
@Override
|
||||
public void onPreReceive(ReceivePack rp, Collection<ReceiveCommand> commands) {
|
||||
if (commands.stream().anyMatch(c -> c.getResult() != Result.NOT_ATTEMPTED)) {
|
||||
// Stop processing when command was already processed by previously invoked
|
||||
// pre-receive hooks
|
||||
return;
|
||||
}
|
||||
Worker w = new Worker(commands);
|
||||
try {
|
||||
w.progress.waitFor(
|
||||
|
|
Loading…
Reference in New Issue